From 865baaed607e2a21252ffdc4bede3182fb0c7210 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 30 Jan 2016 23:09:00 -0800 Subject: [PATCH] test: fix redeclared vars in sequential tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/4999 Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell Reviewed-By: Roman Klauke --- test/sequential/test-child-process-execsync.js | 2 +- test/sequential/test-require-cache-without-stat.js | 4 ++-- test/sequential/test-tcp-wrap-listen.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js index 784f2faf8cc373..6c7df10ffb09a7 100644 --- a/test/sequential/test-child-process-execsync.js +++ b/test/sequential/test-child-process-execsync.js @@ -38,7 +38,7 @@ var msgBuf = new Buffer(msg + '\n'); cmd = `"${process.execPath}" -e "console.log(\'${msg}\');"`; -var ret = execSync(cmd); +ret = execSync(cmd); assert.strictEqual(ret.length, msgBuf.length); assert.deepEqual(ret, msgBuf, 'execSync result buffer should match'); diff --git a/test/sequential/test-require-cache-without-stat.js b/test/sequential/test-require-cache-without-stat.js index c602ab82b11f4d..2571583f7690b5 100644 --- a/test/sequential/test-require-cache-without-stat.js +++ b/test/sequential/test-require-cache-without-stat.js @@ -35,14 +35,14 @@ var counterBefore = counter; // Now load the module a bunch of times with equivalent paths. // stat should not be called. -for (var i = 0; i < 100; i++) { +for (let i = 0; i < 100; i++) { require(common.fixturesDir + '/a'); require('../fixtures/a.js'); require('./../fixtures/a.js'); } // Do the same with a built-in module -for (var i = 0; i < 100; i++) { +for (let i = 0; i < 100; i++) { require('http'); } diff --git a/test/sequential/test-tcp-wrap-listen.js b/test/sequential/test-tcp-wrap-listen.js index d16069f25dbeab..aa9d810130fd43 100644 --- a/test/sequential/test-tcp-wrap-listen.js +++ b/test/sequential/test-tcp-wrap-listen.js @@ -38,8 +38,8 @@ server.onconnection = function(err, client) { var req = new WriteWrap(); req.async = false; - var err = client.writeBuffer(req, buffer); - assert.equal(err, 0); + const returnCode = client.writeBuffer(req, buffer); + assert.equal(returnCode, 0); client.pendingWrites.push(req); console.log('client.writeQueueSize: ' + client.writeQueueSize);