node/test/sequential/test-debugger-breakpoint-exists.js
Archana Kamath 1d2f1eceef
test: update test-debugger-breakpoint-exists.js to use async/await
PR-URL: https://github.com/nodejs/node/pull/44682
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2022-09-27 16:52:39 +00:00

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());