Skip to content

Commit bed89b0

Browse files
inoway46aduh95
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 c9ffffc commit bed89b0

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 script = path.relative(process.cwd(), scriptFullPath);
2929
awaitcli.stepCommand('c');// hit line 3
3030
assert.deepStrictEqual(cli.breakInfo,{filename: script,line: 3});
3131
awaitcli.command('restart');
32+
awaitcli.waitFor(/Debuggerattached\./);
33+
awaitcli.waitForPrompt();
3234
awaitcli.waitForInitialBreak();
3335
assert.deepStrictEqual(cli.breakInfo,{filename: script,line: 1});
3436
awaitcli.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
@@ -58,6 +58,8 @@ const path = require('path');
5858
);
5959
})
6060
.then(()=>cli.command('restart'))
61+
.then(()=>cli.waitFor(/Debuggerattached\./))
62+
.then(()=>cli.waitForPrompt())
6163
.then(()=>cli.waitForInitialBreak())
6264
.then(()=>{
6365
assert.deepStrictEqual(

0 commit comments

Comments
 (0)