From b4af92280b7c1312a91ae36a5e5aed4f1e6c6125 Mon Sep 17 00:00:00 2001 From: Hadis-Fard Date: Fri, 6 Oct 2017 12:06:04 -0700 Subject: [PATCH] test: imporove assert messages Improve assert messages in test-cluster-worker-disconnect.js. PR-URL: https://github.com/nodejs/node/pull/16021 Reviewed-By: Anatoli Papirovski Reviewed-By: Rich Trott --- test/parallel/test-cluster-worker-disconnect.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-cluster-worker-disconnect.js b/test/parallel/test-cluster-worker-disconnect.js index 0554671fea3b61..9d50bc417ac6aa 100644 --- a/test/parallel/test-cluster-worker-disconnect.js +++ b/test/parallel/test-cluster-worker-disconnect.js @@ -62,7 +62,7 @@ if (cluster.isWorker) { // Disconnect worker when it is ready worker.once('listening', common.mustCall(() => { const w = worker.disconnect(); - assert.strictEqual(worker, w, 'did not return a reference'); + assert.strictEqual(worker, w, `${worker.id} did not return a reference`); })); // Check cluster events @@ -101,10 +101,8 @@ if (cluster.isWorker) { assert.ok(c.emitExit, 'Exit event did not emit'); // flags - assert.strictEqual(w.state, 'disconnected', - 'The state property was not set'); - assert.strictEqual(w.voluntaryMode, true, - 'Voluntary exit mode was not set'); + assert.strictEqual(w.state, 'disconnected'); + assert.strictEqual(w.voluntaryMode, true); // is process alive assert.ok(w.died, 'The worker did not die');