From 00b02444038ef01fce0428a0f0472a9e1d0e0b99 Mon Sep 17 00:00:00 2001 From: nam Date: Tue, 22 May 2018 14:01:50 +0200 Subject: [PATCH 1/3] test: string to template literals, to include port test: string to template literals, to include port test: string to template literals, to include port --- test/parallel/test-net-listen-exclusive-random-ports.js | 6 +++--- 1 file changed, 3 insertions(+), 3 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..2dfd18ca8510b6 100644 --- a/test/parallel/test-net-listen-exclusive-random-ports.js +++ b/test/parallel/test-net-listen-exclusive-random-ports.js @@ -9,11 +9,11 @@ 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(); @@ -28,7 +28,7 @@ if (cluster.isMaster) { server.listen({ port: 0, - exclusive: true + exclusive: true, }, function() { process.send(server.address().port); }); From 1f3d160f032e6d36bbe9a955ef76b44de7875c67 Mon Sep 17 00:00:00 2001 From: nam Date: Tue, 22 May 2018 17:28:54 +0200 Subject: [PATCH 2/3] test: fix to align to eslint configuration --- 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 2dfd18ca8510b6..a553a310f598e0 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 on port ${port1}`); + 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 on port ${port2}`); + 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(); From 347d84cda1d4a8c95c26ea31902dcf5c4292d665 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 22 May 2018 22:51:32 -0700 Subject: [PATCH 3/3] remove unrelated comma addition --- test/parallel/test-net-listen-exclusive-random-ports.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-net-listen-exclusive-random-ports.js b/test/parallel/test-net-listen-exclusive-random-ports.js index a553a310f598e0..681e1236cc919a 100644 --- a/test/parallel/test-net-listen-exclusive-random-ports.js +++ b/test/parallel/test-net-listen-exclusive-random-ports.js @@ -30,7 +30,7 @@ if (cluster.isMaster) { server.listen({ port: 0, - exclusive: true, + exclusive: true }, function() { process.send(server.address().port); });