diff --git a/test/common/debugger.js b/test/common/debugger.js index dbaa62e71d3f1c..72eca55c15ec6c 100644 --- a/test/common/debugger.js +++ b/test/common/debugger.js @@ -14,10 +14,6 @@ if (common.isWindows || common.isMacOS) { TIMEOUT = common.platformTimeout(15000); } -function isPreBreak(output) { - return /Break on start/.test(output) && /1 \(function \(exports/.test(output); -} - function startCLI(args, flags = [], spawnOpts = {}, opts = { randomPort: true }) { let stderrOutput = ''; const child = spawn(process.execPath, [ @@ -114,11 +110,6 @@ function startCLI(args, flags = [], spawnOpts = {}, opts = { randomPort: true }) async waitForInitialBreak() { await this.waitFor(/break (?:on start )?in/i); - - if (isPreBreak(this.output)) { - await this.command('next', false); - return this.waitFor(/break in/); - } }, get breakInfo() { diff --git a/test/parallel/test-debugger-break.js b/test/parallel/test-debugger-break.js index 4da400e4475821..09c7ff3497ccb8 100644 --- a/test/parallel/test-debugger-break.js +++ b/test/parallel/test-debugger-break.js @@ -22,7 +22,7 @@ const cli = startCLI([script]); ); assert.match( cli.output, - /> 1 (?:\(function \([^)]+\) \{ )?const x = 10;/, + /> 1 const x = 10;/, 'shows the source and marks the current line'); await cli.stepCommand('n');