Permalink
Browse files

tools: fix new-parens violations

PR-URL: #8478
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information...
Trott authored and Fishrock123 committed Sep 10, 2016
1 parent 2ce364a commit ef5cb129ae8c68395eb6debde443f99a2c71c7bf
@@ -430,7 +430,7 @@ function setupChannel(target, channel) {
this.emit('unref');
}
}
};
}();
var decoder = new StringDecoder('utf8');
var jsonBuffer = '';
@@ -2,7 +2,7 @@
require('../common');
var assert = require('assert');
var t = new (process.binding('timer_wrap').Timer);
var t = new (process.binding('timer_wrap').Timer)();
var called = 0;
function onclose() {
called++;
@@ -792,7 +792,7 @@ checkAlignment(new Map(big_array.map(function(y) { return [y, null]; })));
}
{
const x = new function() {};
const x = new function() {}; // eslint-disable-line new-parens
assert.strictEqual(util.inspect(x), '{}');
}
@@ -30,6 +30,7 @@ assert.equal(false, util.isRegExp(Object.create(RegExp.prototype)));
// isDate
assert.equal(true, util.isDate(new Date()));
assert.equal(true, util.isDate(new Date(0)));
// eslint-disable-next-line new-parens
assert.equal(true, util.isDate(new (context('Date'))));
assert.equal(false, util.isDate(Date()));
assert.equal(false, util.isDate({}));
@@ -41,9 +42,11 @@ assert.equal(false, util.isDate(Object.create(Date.prototype)));
assert.equal(true, util.isError(new Error()));
assert.equal(true, util.isError(new TypeError()));
assert.equal(true, util.isError(new SyntaxError()));
/* eslint-disable new-parens */
assert.equal(true, util.isError(new (context('Error'))));
assert.equal(true, util.isError(new (context('TypeError'))));
assert.equal(true, util.isError(new (context('SyntaxError'))));
/* eslint-enable */
assert.equal(false, util.isError({}));
assert.equal(false, util.isError({ name: 'Error', message: '' }));
assert.equal(false, util.isError([]));

0 comments on commit ef5cb12

Please sign in to comment.