test: fix issues for space-in-parens ESLint rule
authorRoman Reiss <me@silverwind.io>
Tue, 19 Jan 2016 02:23:07 +0000 (03:23 +0100)
committerMyles Borins <mborins@us.ibm.com>
Mon, 15 Feb 2016 19:30:23 +0000 (11:30 -0800)
PR-URL: https://github.com/nodejs/node/pull/4753
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
test/parallel/test-beforeexit-event.js
test/parallel/test-crypto-hmac.js
test/parallel/test-http-client-timeout-agent.js
test/parallel/test-process-binding.js
test/pummel/test-timers.js

index 8e5d66f..6bc5ef5 100644 (file)
@@ -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);
 
index c244c9e..7d66f83 100644 (file)
@@ -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'])
index 51bfb82..6892b38 100644 (file)
@@ -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'});
index 5350a8c..722e933 100644 (file)
@@ -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');
index d911beb..3525c82 100644 (file)
@@ -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);