Skip to content

Commit c587084

Browse files
inoway46juanarbol
authored andcommitted
test: wait for reattach before initial break on restart
PR-URL: #62471 Refs: #61762 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
1 parent 86f5fd3 commit c587084

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

test/parallel/test-debugger-preserve-breaks.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const runTest = async () => {
2929
await cli.stepCommand('c'); // hit line 3
3030
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 3 });
3131
await cli.command('restart');
32+
await cli.waitFor(/Debugger attached\./);
33+
await cli.waitForPrompt();
3234
await cli.waitForInitialBreak();
3335
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
3436
await cli.stepCommand('c');

test/parallel/test-debugger-run-after-quit-restart.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ const path = require('path');
6363
);
6464
})
6565
.then(() => cli.command('restart'))
66+
.then(() => cli.waitFor(/Debugger attached\./))
67+
.then(() => cli.waitForPrompt())
6668
.then(() => cli.waitForInitialBreak())
6769
.then(() => {
6870
assert.deepStrictEqual(

0 commit comments

Comments
 (0)