mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: lint fixes for ESLint update
This commit introduces changes required for the ESLint 5 update. PR-URL: https://github.com/nodejs/node/pull/20855 Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// Flags: --experimental-modules
|
||||
import '../common';
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
if (typeof arguments !== 'undefined') {
|
||||
throw new Error('not an ESM');
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@ require('../common');
|
||||
const { test, assert_equals, assert_true, assert_false } =
|
||||
require('../common/wpt');
|
||||
|
||||
global.console = global.console; // Should not throw.
|
||||
// Assigning to itself should not throw.
|
||||
global.console = global.console; // eslint-disable-line no-self-assign
|
||||
|
||||
const self = global;
|
||||
|
||||
|
||||
@@ -52,8 +52,8 @@ server.on('stream', common.mustCall(function(stream, headers) {
|
||||
common.expectsError(() => (socket.write = undefined), errMsg);
|
||||
|
||||
// Resetting the socket listeners to their own value should not throw.
|
||||
socket.on = socket.on;
|
||||
socket.once = socket.once;
|
||||
socket.on = socket.on; // eslint-disable-line no-self-assign
|
||||
socket.once = socket.once; // eslint-disable-line no-self-assign
|
||||
|
||||
stream.respond();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user