Skip to content

Commit 9f7ff44

Browse files
committed
test: wait for prompt before initial break in debugger tests
1 parent cc96741 commit 9f7ff44

4 files changed

Lines changed: 5 additions & 1 deletion

File tree

test/parallel/test-debugger-backtrace.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const path = require('path');
1717

1818
async function runTest() {
1919
try {
20+
await cli.waitForPrompt();
2021
await cli.waitForInitialBreak();
2122
await cli.waitForPrompt();
2223
await cli.stepCommand('c');

test/parallel/test-debugger-break.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const script = path.relative(process.cwd(), scriptFullPath);
1414
const cli = startCLI([script]);
1515

1616
(async () => {
17+
await cli.waitForPrompt();
1718
await cli.waitForInitialBreak();
1819
await cli.waitForPrompt();
1920
assert.deepStrictEqual(

test/parallel/test-debugger-clear-breakpoints.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ const path = require('path');
2020
throw error;
2121
}
2222

23-
return cli.waitForInitialBreak()
23+
return cli.waitForPrompt()
24+
.then(() => cli.waitForInitialBreak())
2425
.then(() => cli.waitForPrompt())
2526
.then(() => cli.command('sb("break.js", 3)'))
2627
.then(() => cli.command('sb("break.js", 9)'))

test/parallel/test-debugger-sb-before-load.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const otherScript = path.relative(process.cwd(), otherScriptFullPath);
2020
const cli = startCLI([script]);
2121

2222
(async () => {
23+
await cli.waitForPrompt();
2324
await cli.waitForInitialBreak();
2425
await cli.waitForPrompt();
2526
await cli.command('sb("other.js", 2)');

0 commit comments

Comments
 (0)