diff --git a/test/sequential/test-debugger-auto-resume.js b/test/sequential/test-debugger-auto-resume.js index 8a25f5fc804e1a..bdfe45441a039b 100644 --- a/test/sequential/test-debugger-auto-resume.js +++ b/test/sequential/test-debugger-auto-resume.js @@ -20,7 +20,7 @@ addLibraryPath(process.env); const env = { ...process.env }; env.NODE_INSPECT_RESUME_ON_START = '1'; - const cli = startCLI([script], [], { env }); + const cli = startCLI(['--port=0', script], [], { env }); cli.waitForInitialBreak() .then(() => { diff --git a/test/sequential/test-debugger-backtrace.js b/test/sequential/test-debugger-backtrace.js index f362e98068f15e..d22e187514d2cf 100644 --- a/test/sequential/test-debugger-backtrace.js +++ b/test/sequential/test-debugger-backtrace.js @@ -13,7 +13,7 @@ const path = require('path'); { const scriptFullPath = fixtures.path('debugger', 'backtrace.js'); const script = path.relative(process.cwd(), scriptFullPath); - const cli = startCLI([script]); + const cli = startCLI(['--port=0', script]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-break.js b/test/sequential/test-debugger-break.js index fdfe9bd3c40064..9c100d5e1a0e3b 100644 --- a/test/sequential/test-debugger-break.js +++ b/test/sequential/test-debugger-break.js @@ -13,7 +13,7 @@ const path = require('path'); { const scriptFullPath = fixtures.path('debugger', 'break.js'); const script = path.relative(process.cwd(), scriptFullPath); - const cli = startCLI([script]); + const cli = startCLI(['--port=0', script]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-breakpoint-exists.js b/test/sequential/test-debugger-breakpoint-exists.js index 7be0ba657fa981..47621ee5ec0735 100644 --- a/test/sequential/test-debugger-breakpoint-exists.js +++ b/test/sequential/test-debugger-breakpoint-exists.js @@ -10,7 +10,7 @@ const startCLI = require('../common/debugger'); // Test for "Breakpoint at specified location already exists" error. { const script = fixtures.path('debugger', 'three-lines.js'); - const cli = startCLI([script]); + const cli = startCLI(['--port=0', script]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-clear-breakpoints.js b/test/sequential/test-debugger-clear-breakpoints.js index 91349e105a1160..74623ec4371331 100644 --- a/test/sequential/test-debugger-clear-breakpoints.js +++ b/test/sequential/test-debugger-clear-breakpoints.js @@ -13,7 +13,7 @@ const path = require('path'); { const scriptFullPath = fixtures.path('debugger', 'break.js'); const script = path.relative(process.cwd(), scriptFullPath); - const cli = startCLI([script]); + const cli = startCLI(['--port=0', script]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-exceptions.js b/test/sequential/test-debugger-exceptions.js index f20f35d4808a47..0615e804dd8523 100644 --- a/test/sequential/test-debugger-exceptions.js +++ b/test/sequential/test-debugger-exceptions.js @@ -13,7 +13,7 @@ const path = require('path'); { const scriptFullPath = fixtures.path('debugger', 'exceptions.js'); const script = path.relative(process.cwd(), scriptFullPath); - const cli = startCLI([script]); + const cli = startCLI(['--port=0', script]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-exec-scope.js b/test/sequential/test-debugger-exec-scope.js index 9e5d2ac7ebaeeb..085f3c70a73411 100644 --- a/test/sequential/test-debugger-exec-scope.js +++ b/test/sequential/test-debugger-exec-scope.js @@ -10,7 +10,7 @@ const assert = require('assert'); // exec .scope { - const cli = startCLI([fixtures.path('debugger/backtrace.js')]); + const cli = startCLI(['--port=0', fixtures.path('debugger/backtrace.js')]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-exec.js b/test/sequential/test-debugger-exec.js index 4057dd03785e7c..389cf9bb764add 100644 --- a/test/sequential/test-debugger-exec.js +++ b/test/sequential/test-debugger-exec.js @@ -10,7 +10,7 @@ const assert = require('assert'); { - const cli = startCLI([fixtures.path('debugger/alive.js')]); + const cli = startCLI(['--port=0', fixtures.path('debugger/alive.js')]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-heap-profiler.js b/test/sequential/test-debugger-heap-profiler.js index 86eb9d9d0d232f..a9fedce9ee3360 100644 --- a/test/sequential/test-debugger-heap-profiler.js +++ b/test/sequential/test-debugger-heap-profiler.js @@ -17,7 +17,7 @@ const filename = path.join(tmpdir.path, 'node.heapsnapshot'); // Heap profiler take snapshot. { const opts = { cwd: tmpdir.path }; - const cli = startCLI([fixtures.path('debugger/empty.js')], [], opts); + const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')], [], opts); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-help.js b/test/sequential/test-debugger-help.js index e24f873212b589..0139b7b9428112 100644 --- a/test/sequential/test-debugger-help.js +++ b/test/sequential/test-debugger-help.js @@ -9,7 +9,7 @@ const startCLI = require('../common/debugger'); const assert = require('assert'); { - const cli = startCLI([fixtures.path('debugger/empty.js')]); + const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-list.js b/test/sequential/test-debugger-list.js index 594874e140b306..6f2e36e763a651 100644 --- a/test/sequential/test-debugger-list.js +++ b/test/sequential/test-debugger-list.js @@ -8,7 +8,7 @@ const startCLI = require('../common/debugger'); const assert = require('assert'); -const cli = startCLI([fixtures.path('debugger/three-lines.js')]); +const cli = startCLI(['--port=0', fixtures.path('debugger/three-lines.js')]); (async () => { await cli.waitForInitialBreak(); diff --git a/test/sequential/test-debugger-low-level.js b/test/sequential/test-debugger-low-level.js index f6d97f2dfe153d..170ff3c1987c59 100644 --- a/test/sequential/test-debugger-low-level.js +++ b/test/sequential/test-debugger-low-level.js @@ -9,7 +9,7 @@ const assert = require('assert'); // Debugger agent direct access. { - const cli = startCLI([fixtures.path('debugger/three-lines.js')]); + const cli = startCLI(['--port=0', fixtures.path('debugger/three-lines.js')]); const scriptPattern = /^\* (\d+): \S+debugger(?:\/|\\)three-lines\.js/m; function onFatal(error) { diff --git a/test/sequential/test-debugger-object-type-remote-object.js b/test/sequential/test-debugger-object-type-remote-object.js index 7404eae3963447..a055e8ce0fb9e4 100644 --- a/test/sequential/test-debugger-object-type-remote-object.js +++ b/test/sequential/test-debugger-object-type-remote-object.js @@ -8,7 +8,7 @@ const startCLI = require('../common/debugger'); const assert = require('assert'); -const cli = startCLI([fixtures.path('debugger/empty.js')]); +const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')]); (async () => { await cli.waitForInitialBreak(); diff --git a/test/sequential/test-debugger-preserve-breaks.js b/test/sequential/test-debugger-preserve-breaks.js index fbc463af96a1e6..1d17b3ed962a03 100644 --- a/test/sequential/test-debugger-preserve-breaks.js +++ b/test/sequential/test-debugger-preserve-breaks.js @@ -13,7 +13,7 @@ const path = require('path'); { const scriptFullPath = fixtures.path('debugger', 'three-lines.js'); const script = path.relative(process.cwd(), scriptFullPath); - const cli = startCLI([script]); + const cli = startCLI(['--port=0', script]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-profile-command.js b/test/sequential/test-debugger-profile-command.js index 06818c2132d9c5..da81dfc6e10569 100644 --- a/test/sequential/test-debugger-profile-command.js +++ b/test/sequential/test-debugger-profile-command.js @@ -10,7 +10,7 @@ const assert = require('assert'); const fs = require('fs'); const path = require('path'); -const cli = startCLI([fixtures.path('debugger/empty.js')]); +const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')]); const rootDir = path.resolve(__dirname, '..', '..'); diff --git a/test/sequential/test-debugger-profile.js b/test/sequential/test-debugger-profile.js index 992c6f71c00775..3eaf32431d5aae 100644 --- a/test/sequential/test-debugger-profile.js +++ b/test/sequential/test-debugger-profile.js @@ -14,7 +14,7 @@ function delay(ms) { // Profiles. { - const cli = startCLI([fixtures.path('debugger/empty.js')]); + const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-restart-message.js b/test/sequential/test-debugger-restart-message.js index bcd06b4e230131..4b8a167a1626f6 100644 --- a/test/sequential/test-debugger-restart-message.js +++ b/test/sequential/test-debugger-restart-message.js @@ -14,7 +14,7 @@ const startCLI = require('../common/debugger'); // Using `restart` should result in only one "Connect/For help" message. { const script = fixtures.path('debugger', 'three-lines.js'); - const cli = startCLI([script]); + const cli = startCLI(['--port=0', script]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-run-after-quit-restart.js b/test/sequential/test-debugger-run-after-quit-restart.js index a9da07dcdff8bd..2c56f7227aed69 100644 --- a/test/sequential/test-debugger-run-after-quit-restart.js +++ b/test/sequential/test-debugger-run-after-quit-restart.js @@ -13,7 +13,7 @@ const path = require('path'); { const scriptFullPath = fixtures.path('debugger', 'three-lines.js'); const script = path.relative(process.cwd(), scriptFullPath); - const cli = startCLI([script]); + const cli = startCLI(['--port=0', script]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-sb-before-load.js b/test/sequential/test-debugger-sb-before-load.js index 586687800e8e90..996cf3aa527de1 100644 --- a/test/sequential/test-debugger-sb-before-load.js +++ b/test/sequential/test-debugger-sb-before-load.js @@ -17,7 +17,7 @@ const path = require('path'); const otherScriptFullPath = fixtures.path('debugger', 'cjs', 'other.js'); const otherScript = path.relative(process.cwd(), otherScriptFullPath); - const cli = startCLI([script]); + const cli = startCLI(['--port=0', script]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-scripts.js b/test/sequential/test-debugger-scripts.js index c6d4e67920921d..1e2bc5d5bec2dc 100644 --- a/test/sequential/test-debugger-scripts.js +++ b/test/sequential/test-debugger-scripts.js @@ -11,7 +11,7 @@ const assert = require('assert'); // List scripts. { const script = fixtures.path('debugger', 'three-lines.js'); - const cli = startCLI([script]); + const cli = startCLI(['--port=0', script]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-use-strict.js b/test/sequential/test-debugger-use-strict.js index ae82a9fc82352b..dce928697659ea 100644 --- a/test/sequential/test-debugger-use-strict.js +++ b/test/sequential/test-debugger-use-strict.js @@ -11,7 +11,7 @@ const assert = require('assert'); // Test for files that start with strict directive. { const script = fixtures.path('debugger', 'use-strict.js'); - const cli = startCLI([script]); + const cli = startCLI(['--port=0', script]); function onFatal(error) { cli.quit(); diff --git a/test/sequential/test-debugger-watchers.js b/test/sequential/test-debugger-watchers.js index e856132b74e28a..a5681ab9d2b440 100644 --- a/test/sequential/test-debugger-watchers.js +++ b/test/sequential/test-debugger-watchers.js @@ -10,7 +10,7 @@ const assert = require('assert'); // Stepping through breakpoints. { - const cli = startCLI([fixtures.path('debugger/break.js')]); + const cli = startCLI(['--port=0', fixtures.path('debugger/break.js')]); function onFatal(error) { cli.quit();