Skip to content

Commit 1b3d3fe

Browse files
committed
test: wait for ok before initial break in debugger exceptions test
1 parent c54396a commit 1b3d3fe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/parallel/test-debugger-exceptions.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ const path = require('path');
2828

2929
// Next run: With `breakOnException` it pauses in both places.
3030
await cli.command('r');
31-
await cli.waitFor(/Debugger attached\./);
32-
await cli.waitForPrompt();
31+
await cli.waitFor(/ ok\n/);
3332
await cli.waitForInitialBreak();
33+
await cli.waitForPrompt();
3434
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
3535
await cli.command('breakOnException');
3636
await cli.stepCommand('c');
@@ -41,19 +41,19 @@ const path = require('path');
4141
// Next run: With `breakOnUncaught` it only pauses on the 2nd exception.
4242
await cli.command('breakOnUncaught');
4343
await cli.command('r'); // Also, the setting survives the restart.
44-
await cli.waitFor(/Debugger attached\./);
45-
await cli.waitForPrompt();
44+
await cli.waitFor(/ ok\n/);
4645
await cli.waitForInitialBreak();
46+
await cli.waitForPrompt();
4747
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
4848
await cli.stepCommand('c');
4949
assert.ok(cli.output.includes(`exception in ${script}:9`));
5050

5151
// Next run: Back to the initial state! It should die again.
5252
await cli.command('breakOnNone');
5353
await cli.command('r');
54-
await cli.waitFor(/Debugger attached\./);
55-
await cli.waitForPrompt();
54+
await cli.waitFor(/ ok\n/);
5655
await cli.waitForInitialBreak();
56+
await cli.waitForPrompt();
5757
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
5858
await cli.command('c');
5959
await cli.waitFor(/disconnect/);

0 commit comments

Comments
 (0)