From 294dd61a8edf4e27a6b9bf7971f05025b8c598dd Mon Sep 17 00:00:00 2001 From: Adrian Estrada Date: Wed, 21 Dec 2016 16:47:19 -0500 Subject: [PATCH] test: improve test-cluster-worker-constructor.js * use let and const instead of var * use assert.strictEqual instead assert.equal --- .../test-cluster-worker-constructor.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/parallel/test-cluster-worker-constructor.js b/test/parallel/test-cluster-worker-constructor.js index 2a96d24a8a3459..770d45c6a9edb7 100644 --- a/test/parallel/test-cluster-worker-constructor.js +++ b/test/parallel/test-cluster-worker-constructor.js @@ -3,26 +3,26 @@ // validates correct behavior of the cluster.Worker constructor require('../common'); -var assert = require('assert'); -var cluster = require('cluster'); -var worker; +const assert = require('assert'); +const cluster = require('cluster'); +let 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);