summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2018-05-20 15:16:25 -0400
committercjihrig <cjihrig@gmail.com>2018-06-24 12:43:42 -0400
commitd5316bc27df87b62675adec517e5dd3108efd1c2 (patch)
tree5284937e199e4f1d051ed9cb9febaf6d893f059f /test
parent1ee47039742ca94ad4403cf7ccc4a48933ba6f1a (diff)
downloadandroid-node-v8-d5316bc27df87b62675adec517e5dd3108efd1c2.tar.gz
android-node-v8-d5316bc27df87b62675adec517e5dd3108efd1c2.tar.bz2
android-node-v8-d5316bc27df87b62675adec517e5dd3108efd1c2.zip
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>
Diffstat (limited to 'test')
-rw-r--r--test/es-module/test-esm-forbidden-globals.mjs1
-rw-r--r--test/parallel/test-console-is-a-namespace.js3
-rw-r--r--test/parallel/test-http2-socket-proxy.js4
3 files changed, 5 insertions, 3 deletions
diff --git a/test/es-module/test-esm-forbidden-globals.mjs b/test/es-module/test-esm-forbidden-globals.mjs
index 840a7ea541..4e777412a3 100644
--- a/test/es-module/test-esm-forbidden-globals.mjs
+++ b/test/es-module/test-esm-forbidden-globals.mjs
@@ -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');
}
diff --git a/test/parallel/test-console-is-a-namespace.js b/test/parallel/test-console-is-a-namespace.js
index 95c652abdd..8266541187 100644
--- a/test/parallel/test-console-is-a-namespace.js
+++ b/test/parallel/test-console-is-a-namespace.js
@@ -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;
diff --git a/test/parallel/test-http2-socket-proxy.js b/test/parallel/test-http2-socket-proxy.js
index 71429b3db2..f7d97a3bb1 100644
--- a/test/parallel/test-http2-socket-proxy.js
+++ b/test/parallel/test-http2-socket-proxy.js
@@ -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();