From 577acca4d7899cd0d5f22a7c42aae3a460de6cb1 Mon Sep 17 00:00:00 2001 From: inoway46 Date: Sun, 28 Jun 2026 13:58:15 +0900 Subject: [PATCH] test: remove obsolete debugger pre-break handling Signed-off-by: inoway46 --- test/common/debugger.js | 9 --------- test/parallel/test-debugger-break.js | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) 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');