From 9926b5a25fff7d150f834d165920d47166200287 Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Tue, 19 Jan 2016 03:23:07 +0100 Subject: [PATCH] test: fix issues for space-in-parens ESLint rule PR-URL: https://github.com/nodejs/node/pull/4753 Reviewed-By: Colin Ihrig Reviewed-By: Evan Lucas --- test/parallel/test-beforeexit-event.js | 2 +- test/parallel/test-crypto-hmac.js | 2 +- test/parallel/test-http-client-timeout-agent.js | 2 +- test/parallel/test-process-binding.js | 2 +- test/pummel/test-timers.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-beforeexit-event.js b/test/parallel/test-beforeexit-event.js index 8e5d66f5f5d7c7..6bc5ef53ed9518 100644 --- a/test/parallel/test-beforeexit-event.js +++ b/test/parallel/test-beforeexit-event.js @@ -5,7 +5,7 @@ var common = require('../common'); var revivals = 0; var deaths = 0; -process.on('beforeExit', function() { deaths++; } ); +process.on('beforeExit', function() { deaths++; }); process.once('beforeExit', tryImmediate); diff --git a/test/parallel/test-crypto-hmac.js b/test/parallel/test-crypto-hmac.js index c244c9e0dd12c2..7d66f83baaed8e 100644 --- a/test/parallel/test-crypto-hmac.js +++ b/test/parallel/test-crypto-hmac.js @@ -62,7 +62,7 @@ var wikipedia = [ for (var i = 0, l = wikipedia.length; i < l; i++) { for (var hash in wikipedia[i]['hmac']) { // FIPS does not support MD5. - if (common.hasFipsCrypto && hash == 'md5' ) + if (common.hasFipsCrypto && hash == 'md5') continue; var result = crypto.createHmac(hash, wikipedia[i]['key']) .update(wikipedia[i]['data']) diff --git a/test/parallel/test-http-client-timeout-agent.js b/test/parallel/test-http-client-timeout-agent.js index 51bfb8299b13df..6892b38719fb1a 100644 --- a/test/parallel/test-http-client-timeout-agent.js +++ b/test/parallel/test-http-client-timeout-agent.js @@ -17,7 +17,7 @@ var options = { var server = http.createServer(function(req, res) { const m = /\/(.*)/.exec(req.url); const reqid = parseInt(m[1], 10); - if ( reqid % 2 ) { + if (reqid % 2) { // do not reply the request } else { res.writeHead(200, {'Content-Type': 'text/plain'}); diff --git a/test/parallel/test-process-binding.js b/test/parallel/test-process-binding.js index 5350a8c66932cb..722e9333aff60a 100644 --- a/test/parallel/test-process-binding.js +++ b/test/parallel/test-process-binding.js @@ -12,7 +12,7 @@ assert.throws( assert.doesNotThrow(function() { process.binding('buffer'); }, function(err) { - if ( (err instanceof Error) ) { + if (err instanceof Error) { return true; } }, 'unexpected error'); diff --git a/test/pummel/test-timers.js b/test/pummel/test-timers.js index d911beb6b09288..3525c827a9e6b7 100644 --- a/test/pummel/test-timers.js +++ b/test/pummel/test-timers.js @@ -30,7 +30,7 @@ clearTimeout(id); setInterval(function() { interval_count += 1; - var endtime = new Date( ); + var endtime = new Date(); var diff = endtime - starttime; assert.ok(diff > 0);