From 9bbab9147968c9348f55d971a02fb03893919c63 Mon Sep 17 00:00:00 2001 From: nam Date: Tue, 22 May 2018 14:01:50 +0200 Subject: [PATCH] test: include port in assertion message PR-URL: https://github.com/nodejs/node/pull/20889 Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca --- test/parallel/test-net-listen-exclusive-random-ports.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-net-listen-exclusive-random-ports.js b/test/parallel/test-net-listen-exclusive-random-ports.js index 00d5e73cb17675..681e1236cc919a 100644 --- a/test/parallel/test-net-listen-exclusive-random-ports.js +++ b/test/parallel/test-net-listen-exclusive-random-ports.js @@ -9,11 +9,13 @@ if (cluster.isMaster) { const worker1 = cluster.fork(); worker1.on('message', function(port1) { - assert.strictEqual(port1, port1 | 0, 'first worker could not listen'); + assert.strictEqual(port1, port1 | 0, + `first worker could not listen on port ${port1}`); const worker2 = cluster.fork(); worker2.on('message', function(port2) { - assert.strictEqual(port2, port2 | 0, 'second worker could not listen'); + assert.strictEqual(port2, port2 | 0, + `second worker could not listen on port ${port2}`); assert.notStrictEqual(port1, port2, 'ports should not be equal'); worker1.kill(); worker2.kill();