From 8dd07244e9e0b538a8bafa828bd2738319ffa6f7 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 30 Jan 2016 15:22:35 -0800 Subject: [PATCH] test: remove test-cluster-* var redeclarations PR-URL: https://github.com/nodejs/node/pull/4980 Reviewed-By: Brian White Reviewed-By: James M Snell --- test/parallel/test-cluster-bind-twice.js | 6 +++--- test/parallel/test-cluster-dgram-2.js | 1 - test/parallel/test-cluster-eaddrinuse.js | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-cluster-bind-twice.js b/test/parallel/test-cluster-bind-twice.js index b3046cd8d5e1cc..6328f588b30b2a 100644 --- a/test/parallel/test-cluster-bind-twice.js +++ b/test/parallel/test-cluster-bind-twice.js @@ -51,7 +51,7 @@ if (!id) { b.send('START'); }); - var ok = false; + let ok = false; b.on('message', function(m) { if (typeof m === 'object') return; // ignore system messages @@ -68,7 +68,7 @@ if (!id) { else if (id === 'one') { if (cluster.isMaster) return startWorker(); - var server = http.createServer(common.fail).listen(common.PORT, function() { + http.createServer(common.fail).listen(common.PORT, function() { process.send('READY'); }); @@ -79,7 +79,7 @@ else if (id === 'one') { else if (id === 'two') { if (cluster.isMaster) return startWorker(); - var ok = false; + let ok = false; process.on('exit', function() { assert(ok); }); diff --git a/test/parallel/test-cluster-dgram-2.js b/test/parallel/test-cluster-dgram-2.js index 6426e1c224beb7..69e9e9d7500f59 100644 --- a/test/parallel/test-cluster-dgram-2.js +++ b/test/parallel/test-cluster-dgram-2.js @@ -20,7 +20,6 @@ else function master() { - var i; var received = 0; // Start listening on a socket. diff --git a/test/parallel/test-cluster-eaddrinuse.js b/test/parallel/test-cluster-eaddrinuse.js index 3821551f00a32c..7947fb9bab8e05 100644 --- a/test/parallel/test-cluster-eaddrinuse.js +++ b/test/parallel/test-cluster-eaddrinuse.js @@ -11,7 +11,7 @@ var net = require('net'); var id = '' + process.argv[2]; if (id === 'undefined') { - var server = net.createServer(common.fail); + const server = net.createServer(common.fail); server.listen(common.PORT, function() { var worker = fork(__filename, ['worker']); worker.on('message', function(msg) { @@ -23,7 +23,7 @@ if (id === 'undefined') { }); } else if (id === 'worker') { - var server = net.createServer(common.fail); + let server = net.createServer(common.fail); server.listen(common.PORT, common.fail); server.on('error', common.mustCall(function(e) { assert(e.code, 'EADDRINUSE');