From fc5334513c07ac3ab22a4b7c8dc8d97606b9af94 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 8 Oct 2019 18:41:21 +0200 Subject: [PATCH] test: remove unnecessary --expose-internals flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/29886 Reviewed-By: Colin Ihrig Reviewed-By: Michaƫl Zasso Reviewed-By: Richard Lau Reviewed-By: Jeremiah Senkpiel Reviewed-By: Gus Caplan Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater --- test/async-hooks/test-httpparser.request.js | 1 - test/async-hooks/test-httpparser.response.js | 1 - test/common/inspector-helper.js | 2 +- test/parallel/test-bootstrap-modules.js | 1 - test/parallel/test-http2-compat-errors.js | 1 - test/parallel/test-http2-compat-serverresponse-close.js | 1 - test/parallel/test-http2-server-errors.js | 2 -- test/parallel/test-http2-session-unref.js | 2 -- test/parallel/test-inspect-async-hook-setup-at-inspect.js | 1 - test/parallel/test-inspector-esm.js | 1 - test/parallel/test-inspector-multisession-ws.js | 1 - test/parallel/test-inspector-reported-host.js | 1 - test/parallel/test-inspector-wait-for-connection.js | 2 -- test/parallel/test-inspector-waiting-for-disconnect.js | 1 - test/sequential/test-http-regr-gh-2928.js | 1 - .../test-inspector-async-hook-setup-at-inspect-brk.js | 1 - .../test-inspector-async-stack-traces-promise-then.js | 1 - .../test-inspector-async-stack-traces-set-interval.js | 1 - test/sequential/test-inspector-break-e.js | 1 - test/sequential/test-inspector-break-when-eval.js | 1 - test/sequential/test-inspector-console.js | 1 - test/sequential/test-inspector-debug-brk-flag.js | 1 - test/sequential/test-inspector-debug-end.js | 1 - test/sequential/test-inspector-exception.js | 1 - test/sequential/test-inspector-ip-detection.js | 1 - test/sequential/test-inspector-not-blocked-on-idle.js | 1 - .../sequential/test-inspector-runtime-evaluate-with-timeout.js | 1 - test/sequential/test-inspector-scriptparsed-context.js | 1 - test/sequential/test-inspector-stop-profile-after-done.js | 1 - test/sequential/test-inspector-stress-http.js | 1 - test/sequential/test-inspector.js | 1 - test/wpt/test-console.js | 3 --- test/wpt/test-encoding.js | 3 --- test/wpt/test-microtask-queuing.js | 2 -- 34 files changed, 1 insertion(+), 42 deletions(-) diff --git a/test/async-hooks/test-httpparser.request.js b/test/async-hooks/test-httpparser.request.js index f4552398d38e8f..cd61aa25e3f6e7 100644 --- a/test/async-hooks/test-httpparser.request.js +++ b/test/async-hooks/test-httpparser.request.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/async-hooks/test-httpparser.response.js b/test/async-hooks/test-httpparser.response.js index a207a62636f291..d6625661eb7407 100644 --- a/test/async-hooks/test-httpparser.response.js +++ b/test/async-hooks/test-httpparser.response.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/common/inspector-helper.js b/test/common/inspector-helper.js index b0c02b8fc52f49..42d6baed4410de 100644 --- a/test/common/inspector-helper.js +++ b/test/common/inspector-helper.js @@ -6,7 +6,7 @@ const http = require('http'); const fixtures = require('../common/fixtures'); const { spawn } = require('child_process'); const { parse: parseURL } = require('url'); -const { pathToFileURL } = require('internal/url'); +const { pathToFileURL } = require('url'); const { EventEmitter } = require('events'); const _MAINSCRIPT = fixtures.path('loop.js'); diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index 7ca48c49cb6742..939658a3b0553f 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; // This list must be computed before we require any modules to diff --git a/test/parallel/test-http2-compat-errors.js b/test/parallel/test-http2-compat-errors.js index c84318bad68e35..18dc385422a48e 100644 --- a/test/parallel/test-http2-compat-errors.js +++ b/test/parallel/test-http2-compat-errors.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-http2-compat-serverresponse-close.js b/test/parallel/test-http2-compat-serverresponse-close.js index 0ff6bd3a83f600..71079f425c97fc 100644 --- a/test/parallel/test-http2-compat-serverresponse-close.js +++ b/test/parallel/test-http2-compat-serverresponse-close.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-http2-server-errors.js b/test/parallel/test-http2-server-errors.js index fec6cc84bec72a..959ddccdc7c28a 100644 --- a/test/parallel/test-http2-server-errors.js +++ b/test/parallel/test-http2-server-errors.js @@ -1,6 +1,4 @@ -// Flags: --expose-internals 'use strict'; - const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); diff --git a/test/parallel/test-http2-session-unref.js b/test/parallel/test-http2-session-unref.js index dcfbccf215aec8..8afd659d33baa8 100644 --- a/test/parallel/test-http2-session-unref.js +++ b/test/parallel/test-http2-session-unref.js @@ -1,6 +1,4 @@ 'use strict'; -// Flags: --expose-internals - // Tests that calling unref() on Http2Session: // (1) Prevents it from keeping the process alive // (2) Doesn't crash diff --git a/test/parallel/test-inspect-async-hook-setup-at-inspect.js b/test/parallel/test-inspect-async-hook-setup-at-inspect.js index 48de93c061479b..b68617b5d52276 100644 --- a/test/parallel/test-inspect-async-hook-setup-at-inspect.js +++ b/test/parallel/test-inspect-async-hook-setup-at-inspect.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); diff --git a/test/parallel/test-inspector-esm.js b/test/parallel/test-inspector-esm.js index d94f8d10bb08ca..b5f55b68d717ff 100644 --- a/test/parallel/test-inspector-esm.js +++ b/test/parallel/test-inspector-esm.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-inspector-multisession-ws.js b/test/parallel/test-inspector-multisession-ws.js index 02fde12e1c1c2f..6b07af0b85e987 100644 --- a/test/parallel/test-inspector-multisession-ws.js +++ b/test/parallel/test-inspector-multisession-ws.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-inspector-reported-host.js b/test/parallel/test-inspector-reported-host.js index 142003e49f747c..b3bc7368032c9c 100644 --- a/test/parallel/test-inspector-reported-host.js +++ b/test/parallel/test-inspector-reported-host.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-inspector-wait-for-connection.js b/test/parallel/test-inspector-wait-for-connection.js index e6cfd81deba24b..44bb6dd5e1c30f 100644 --- a/test/parallel/test-inspector-wait-for-connection.js +++ b/test/parallel/test-inspector-wait-for-connection.js @@ -1,5 +1,3 @@ -// Flags: --expose-internals - 'use strict'; const common = require('../common'); diff --git a/test/parallel/test-inspector-waiting-for-disconnect.js b/test/parallel/test-inspector-waiting-for-disconnect.js index 4c2ebdb1daaaea..187875abc1b621 100644 --- a/test/parallel/test-inspector-waiting-for-disconnect.js +++ b/test/parallel/test-inspector-waiting-for-disconnect.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/sequential/test-http-regr-gh-2928.js b/test/sequential/test-http-regr-gh-2928.js index 5111e234d168f5..149aaeb6e6e420 100644 --- a/test/sequential/test-http-regr-gh-2928.js +++ b/test/sequential/test-http-regr-gh-2928.js @@ -1,7 +1,6 @@ // This test is designed to fail with a segmentation fault in Node.js 4.1.0 and // execute without issues in Node.js 4.1.1 and up. -// Flags: --expose-internals 'use strict'; const common = require('../common'); const assert = require('assert'); diff --git a/test/sequential/test-inspector-async-hook-setup-at-inspect-brk.js b/test/sequential/test-inspector-async-hook-setup-at-inspect-brk.js index 85a612be212f1b..595f934c0238a8 100644 --- a/test/sequential/test-inspector-async-hook-setup-at-inspect-brk.js +++ b/test/sequential/test-inspector-async-hook-setup-at-inspect-brk.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); diff --git a/test/sequential/test-inspector-async-stack-traces-promise-then.js b/test/sequential/test-inspector-async-stack-traces-promise-then.js index a6bbd2686cf41c..f9a30e3f5471ea 100644 --- a/test/sequential/test-inspector-async-stack-traces-promise-then.js +++ b/test/sequential/test-inspector-async-stack-traces-promise-then.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); diff --git a/test/sequential/test-inspector-async-stack-traces-set-interval.js b/test/sequential/test-inspector-async-stack-traces-set-interval.js index 451cc14b1cac4c..ee37a654958c6a 100644 --- a/test/sequential/test-inspector-async-stack-traces-set-interval.js +++ b/test/sequential/test-inspector-async-stack-traces-set-interval.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); diff --git a/test/sequential/test-inspector-break-e.js b/test/sequential/test-inspector-break-e.js index 6d4fbbb474ecfd..6aae729977b5d8 100644 --- a/test/sequential/test-inspector-break-e.js +++ b/test/sequential/test-inspector-break-e.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); diff --git a/test/sequential/test-inspector-break-when-eval.js b/test/sequential/test-inspector-break-when-eval.js index 9952650252310e..c419a0c530dc4d 100644 --- a/test/sequential/test-inspector-break-when-eval.js +++ b/test/sequential/test-inspector-break-when-eval.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); diff --git a/test/sequential/test-inspector-console.js b/test/sequential/test-inspector-console.js index 3d36e9328dd529..15e2e2e8f63978 100644 --- a/test/sequential/test-inspector-console.js +++ b/test/sequential/test-inspector-console.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/sequential/test-inspector-debug-brk-flag.js b/test/sequential/test-inspector-debug-brk-flag.js index 7fa85c269c9343..f281f2c09ce4b9 100644 --- a/test/sequential/test-inspector-debug-brk-flag.js +++ b/test/sequential/test-inspector-debug-brk-flag.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/sequential/test-inspector-debug-end.js b/test/sequential/test-inspector-debug-end.js index 4c775981f1f3c9..789fe9c76323d8 100644 --- a/test/sequential/test-inspector-debug-end.js +++ b/test/sequential/test-inspector-debug-end.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); diff --git a/test/sequential/test-inspector-exception.js b/test/sequential/test-inspector-exception.js index de089ec240f148..9a453eb7deb9d8 100644 --- a/test/sequential/test-inspector-exception.js +++ b/test/sequential/test-inspector-exception.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); const fixtures = require('../common/fixtures'); diff --git a/test/sequential/test-inspector-ip-detection.js b/test/sequential/test-inspector-ip-detection.js index 4e0f9b871b8ab0..6af06bb4828324 100644 --- a/test/sequential/test-inspector-ip-detection.js +++ b/test/sequential/test-inspector-ip-detection.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/sequential/test-inspector-not-blocked-on-idle.js b/test/sequential/test-inspector-not-blocked-on-idle.js index b5a16316dece9f..032efd6a9f62a0 100644 --- a/test/sequential/test-inspector-not-blocked-on-idle.js +++ b/test/sequential/test-inspector-not-blocked-on-idle.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); diff --git a/test/sequential/test-inspector-runtime-evaluate-with-timeout.js b/test/sequential/test-inspector-runtime-evaluate-with-timeout.js index 79c746540bda5b..b20aa77a5d5b92 100644 --- a/test/sequential/test-inspector-runtime-evaluate-with-timeout.js +++ b/test/sequential/test-inspector-runtime-evaluate-with-timeout.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/sequential/test-inspector-scriptparsed-context.js b/test/sequential/test-inspector-scriptparsed-context.js index 944829f59d6b95..3a4c3f84692be3 100644 --- a/test/sequential/test-inspector-scriptparsed-context.js +++ b/test/sequential/test-inspector-scriptparsed-context.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); diff --git a/test/sequential/test-inspector-stop-profile-after-done.js b/test/sequential/test-inspector-stop-profile-after-done.js index cde1a0256067fe..e242658e296d6c 100644 --- a/test/sequential/test-inspector-stop-profile-after-done.js +++ b/test/sequential/test-inspector-stop-profile-after-done.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); diff --git a/test/sequential/test-inspector-stress-http.js b/test/sequential/test-inspector-stress-http.js index fd168f29f7bb0f..8d4a2db9570aad 100644 --- a/test/sequential/test-inspector-stress-http.js +++ b/test/sequential/test-inspector-stress-http.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/sequential/test-inspector.js b/test/sequential/test-inspector.js index 04381918583bc9..b5ced631643d5f 100644 --- a/test/sequential/test-inspector.js +++ b/test/sequential/test-inspector.js @@ -1,4 +1,3 @@ -// Flags: --expose-internals 'use strict'; const common = require('../common'); diff --git a/test/wpt/test-console.js b/test/wpt/test-console.js index 7b23fe8d3e619d..ae0e3385479bae 100644 --- a/test/wpt/test-console.js +++ b/test/wpt/test-console.js @@ -1,7 +1,4 @@ 'use strict'; - -// Flags: --expose-internals - require('../common'); const { WPTRunner } = require('../common/wpt'); diff --git a/test/wpt/test-encoding.js b/test/wpt/test-encoding.js index 8145debd66a11a..8cd0d5e04e0b7b 100644 --- a/test/wpt/test-encoding.js +++ b/test/wpt/test-encoding.js @@ -1,7 +1,4 @@ 'use strict'; - -// Flags: --expose-internals - require('../common'); const { MessageChannel } = require('worker_threads'); const { WPTRunner } = require('../common/wpt'); diff --git a/test/wpt/test-microtask-queuing.js b/test/wpt/test-microtask-queuing.js index a600bf58d7c700..84f29ac2b994b0 100644 --- a/test/wpt/test-microtask-queuing.js +++ b/test/wpt/test-microtask-queuing.js @@ -1,7 +1,5 @@ 'use strict'; -// Flags: --expose-internals - require('../common'); const { WPTRunner } = require('../common/wpt');