Skip to content

Commit 497d1a4

Browse files
committed
test: relax debugger attach sync in tests
1 parent 5babc8d commit 497d1a4

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

test/parallel/test-debugger-extract-function-name.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import assert from 'assert';
1010
const cli = startCLI([fixtures.path('debugger', 'three-lines.js')]);
1111

1212
try {
13-
await cli.waitForInitialBreak();
13+
await cli.waitFor(/Debugger attached\./);
1414
await cli.waitForPrompt();
1515
await cli.command('exec a = function func() {}; a;');
1616
assert.match(cli.output, /\[Function: func\]/);

test/parallel/test-debugger-random-port-with-inspect-port.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const script = fixtures.path('debugger', 'three-lines.js');
1313
const cli = startCLI(['--inspect-port=0', script], [], {}, { randomPort: false });
1414

1515
(async () => {
16-
await cli.waitForInitialBreak();
16+
await cli.waitFor(/Debugger attached\./);
1717
await cli.waitForPrompt();
1818
assert.match(cli.output, /debug>/, 'prints a prompt');
1919
assert.match(

test/parallel/test-debugger-watch-validation.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const assert = require('assert');
1111
const cli = startCLI([fixtures.path('debugger/break.js')]);
1212

1313
(async () => {
14-
await cli.waitForInitialBreak();
14+
await cli.waitFor(/Debugger attached\./);
15+
await cli.waitForPrompt();
1516
await cli.command('watch()');
1617
await cli.waitFor(/ERR_INVALID_ARG_TYPE/);
1718
assert.match(cli.output, /TypeError \[ERR_INVALID_ARG_TYPE\]: The "expression" argument must be of type string\. Received undefined/);

0 commit comments

Comments
 (0)