Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6ccb15f

Browse filesBrowse files
pfaffetargos
authored andcommitted
test: adapt debugger tests to V8 11.4
Accept a new `step` break message. PR-URL: #49639 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent fd21429 commit 6ccb15f
Copy full SHA for 6ccb15f

File tree

Expand file treeCollapse file tree

3 files changed

+7
-7
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+7
-7
lines changed
Open diff view settings
Collapse file

‎test/common/debugger.js‎

Copy file name to clipboardExpand all lines: test/common/debugger.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const spawn = require('child_process').spawn;
44

55
const BREAK_MESSAGE = new RegExp('(?:' + [
66
'assert', 'break', 'break on start', 'debugCommand',
7-
'exception', 'other', 'promiseRejection',
7+
'exception', 'other', 'promiseRejection', 'step',
88
].join('|') + ') in', 'i');
99

1010
let TIMEOUT = common.platformTimeout(5000);
@@ -121,13 +121,13 @@ function startCLI(args, flags = [], spawnOpts = {}) {
121121
get breakInfo() {
122122
const output = this.output;
123123
const breakMatch =
124-
output.match(/break (?:on start )?in ([^\n]+):(\d+)\n/i);
124+
output.match(/(step |break (?:on start )?)in ([^\n]+):(\d+)\n/i);
125125

126126
if (breakMatch === null) {
127127
throw new Error(
128128
`Could not find breakpoint info in ${JSON.stringify(output)}`);
129129
}
130-
return { filename: breakMatch[1], line: +breakMatch[2] };
130+
return { filename: breakMatch[2], line: +breakMatch[3] };
131131
},
132132

133133
ctrlC() {
Collapse file

‎test/parallel/test-debugger-break.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-debugger-break.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const cli = startCLI(['--port=0', script]);
2727

2828
await cli.stepCommand('n');
2929
assert.ok(
30-
cli.output.includes(`break in ${script}:2`),
30+
cli.output.includes(`step in ${script}:2`),
3131
'pauses in next line of the script');
3232
assert.match(
3333
cli.output,
@@ -36,7 +36,7 @@ const cli = startCLI(['--port=0', script]);
3636

3737
await cli.stepCommand('next');
3838
assert.ok(
39-
cli.output.includes(`break in ${script}:3`),
39+
cli.output.includes(`step in ${script}:3`),
4040
'pauses in next line of the script');
4141
assert.match(
4242
cli.output,
@@ -89,7 +89,7 @@ const cli = startCLI(['--port=0', script]);
8989
await cli.stepCommand('');
9090
assert.match(
9191
cli.output,
92-
/break in node:timers/,
92+
/step in node:timers/,
9393
'entered timers.js');
9494

9595
await cli.stepCommand('cont');
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-debugger-run-after-quit-restart.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const path = require('path');
2525
.then(() => cli.stepCommand('n'))
2626
.then(() => {
2727
assert.ok(
28-
cli.output.includes(`break in ${script}:2`),
28+
cli.output.includes(`step in ${script}:2`),
2929
'steps to the 2nd line'
3030
);
3131
})

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.