Browse Source

test: refactoring test-cluster-worker-constructor

- Using assert.strictEqual instead assert.equal

PR-URL: https://github.com/nodejs/node/pull/9956
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
v6
Christopher Rokita 8 years ago
committed by Italo A. Casas
parent
commit
70d752eac8
  1. 18
      test/parallel/test-cluster-worker-constructor.js

18
test/parallel/test-cluster-worker-constructor.js

@ -8,21 +8,21 @@ var cluster = require('cluster');
var worker; var worker;
worker = new cluster.Worker(); worker = new cluster.Worker();
assert.equal(worker.suicide, undefined); assert.strictEqual(worker.suicide, undefined);
assert.equal(worker.state, 'none'); assert.strictEqual(worker.state, 'none');
assert.equal(worker.id, 0); assert.strictEqual(worker.id, 0);
assert.equal(worker.process, undefined); assert.strictEqual(worker.process, undefined);
worker = new cluster.Worker({ worker = new cluster.Worker({
id: 3, id: 3,
state: 'online', state: 'online',
process: process process: process
}); });
assert.equal(worker.suicide, undefined); assert.strictEqual(worker.suicide, undefined);
assert.equal(worker.state, 'online'); assert.strictEqual(worker.state, 'online');
assert.equal(worker.id, 3); assert.strictEqual(worker.id, 3);
assert.equal(worker.process, process); assert.strictEqual(worker.process, process);
worker = cluster.Worker.call({}, {id: 5}); worker = cluster.Worker.call({}, {id: 5});
assert(worker instanceof cluster.Worker); assert(worker instanceof cluster.Worker);
assert.equal(worker.id, 5); assert.strictEqual(worker.id, 5);

Loading…
Cancel
Save