mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00

update the `startCLI` debugging testing utility to set by default the port to use to `0` (i.e. a random port) PR-URL: https://github.com/nodejs/node/pull/59042 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
24 lines
668 B
JavaScript
24 lines
668 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const fixtures = require('../common/fixtures');
|
|
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]);
|
|
|
|
(async () => {
|
|
try {
|
|
await cli.waitForInitialBreak();
|
|
await cli.waitForPrompt();
|
|
await cli.command('setBreakpoint(1)');
|
|
await cli.command('setBreakpoint(1)');
|
|
await cli.waitFor(/Breakpoint at specified location already exists/);
|
|
} finally {
|
|
await cli.quit();
|
|
}
|
|
})().then(common.mustCall());
|