Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions test/parallel/test-debugger-auto-resume.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ addLibraryPath(process.env);

const cli = startCLI([script], [], { env });

await cli.waitForPrompt();
await cli.waitForInitialBreak();
await cli.waitForPrompt();
assert.deepStrictEqual(cli.breakInfo, {
filename: script,
line: 10,
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-debugger-backtrace.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const path = require('path');

async function runTest() {
try {
await cli.waitForPrompt();
await cli.waitForInitialBreak();
await cli.waitForPrompt();
await cli.stepCommand('c');
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-debugger-break.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const script = path.relative(process.cwd(), scriptFullPath);
const cli = startCLI([script]);

(async () => {
await cli.waitForPrompt();
await cli.waitForInitialBreak();
await cli.waitForPrompt();
assert.deepStrictEqual(
Expand Down
3 changes: 2 additions & 1 deletion test/parallel/test-debugger-clear-breakpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const path = require('path');
throw error;
}

return cli.waitForInitialBreak()
return cli.waitForPrompt()
.then(() => cli.waitForInitialBreak())
.then(() => cli.waitForPrompt())
.then(() => cli.command('sb("break.js", 3)'))
.then(() => cli.command('sb("break.js", 9)'))
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-debugger-exceptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const path = require('path');

(async () => {
try {
await cli.waitForInitialBreak();
await cli.waitForPrompt();
await cli.waitForInitialBreak();
await cli.waitForPrompt();
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });

Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-debugger-extract-function-name.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import assert from 'assert';
const cli = startCLI([fixtures.path('debugger', 'three-lines.js')]);

try {
await cli.waitForPrompt();
await cli.waitForInitialBreak();
await cli.waitForPrompt();
await cli.command('exec a = function func() {}; a;');
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-debugger-help.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import assert from 'assert';
const cli = startCLI([fixtures.path('debugger', 'empty.js')]);

try {
await cli.waitForPrompt();
await cli.waitForInitialBreak();
await cli.waitForPrompt();
await cli.command('help');
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-debugger-object-type-remote-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const assert = require('assert');
const cli = startCLI([fixtures.path('debugger/empty.js')]);

(async () => {
await cli.waitForPrompt();
await cli.waitForInitialBreak();
await cli.waitForPrompt();
await cli.command('exec new Date(0)');
Expand Down
2 changes: 2 additions & 0 deletions test/parallel/test-debugger-preserve-breaks.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ const script = path.relative(process.cwd(), scriptFullPath);
await cli.stepCommand('c'); // hit line 3
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 3 });
await cli.command('restart');
await cli.waitForPrompt();
await cli.waitForInitialBreak();
await cli.waitForPrompt();
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
await cli.stepCommand('c');
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 2 });
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-debugger-profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function delay(ms) {

try {
(async () => {
await cli.waitForPrompt();
await cli.waitForInitialBreak();
await cli.waitForPrompt();
await cli.command('exec console.profile()');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const script = fixtures.path('debugger', 'three-lines.js');
const cli = startCLI(['--inspect-port=0', script], [], {}, { randomPort: false });

(async () => {
await cli.waitForInitialBreak();
await cli.waitFor(/Debugger attached\./);
await cli.waitForPrompt();
assert.match(cli.output, /debug>/, 'prints a prompt');
assert.match(
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-debugger-sb-before-load.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const otherScript = path.relative(process.cwd(), otherScriptFullPath);
const cli = startCLI([script]);

(async () => {
await cli.waitForPrompt();
await cli.waitForInitialBreak();
await cli.waitForPrompt();
await cli.command('sb("other.js", 2)');
Expand Down
3 changes: 2 additions & 1 deletion test/parallel/test-debugger-watch-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const assert = require('assert');
const cli = startCLI([fixtures.path('debugger/break.js')]);

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