Skip to content

Commit

Permalink
test: refactoring test-cluster-worker-constructor
Browse files Browse the repository at this point in the history
- Using assert.strictEqual instead assert.equal

PR-URL: #9956
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
  • Loading branch information
crokita authored and targos committed Dec 28, 2016
1 parent 2bcc75b commit c63009d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/parallel/test-cluster-worker-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ var cluster = require('cluster');
var worker;

worker = new cluster.Worker();
assert.equal(worker.suicide, undefined);
assert.equal(worker.state, 'none');
assert.equal(worker.id, 0);
assert.equal(worker.process, undefined);
assert.strictEqual(worker.suicide, undefined);
assert.strictEqual(worker.state, 'none');
assert.strictEqual(worker.id, 0);
assert.strictEqual(worker.process, undefined);

worker = new cluster.Worker({
id: 3,
state: 'online',
process: process
});
assert.equal(worker.suicide, undefined);
assert.equal(worker.state, 'online');
assert.equal(worker.id, 3);
assert.equal(worker.process, process);
assert.strictEqual(worker.suicide, undefined);
assert.strictEqual(worker.state, 'online');
assert.strictEqual(worker.id, 3);
assert.strictEqual(worker.process, process);

worker = cluster.Worker.call({}, {id: 5});
assert(worker instanceof cluster.Worker);
assert.equal(worker.id, 5);
assert.strictEqual(worker.id, 5);

0 comments on commit c63009d

Please sign in to comment.