diff --git a/test/common/debugger.js b/test/common/debugger.js index 0cb4c54eeecfb1..d2ac4f3b6c5fbf 100644 --- a/test/common/debugger.js +++ b/test/common/debugger.js @@ -104,13 +104,12 @@ function startCLI(args, flags = [], spawnOpts = {}) { }, async waitForInitialBreak() { - return this.waitFor(/break (?:on start )?in/i) - .then(async () => { - if (isPreBreak(this.output)) { - return this.command('next', false) - .then(() => this.waitFor(/break in/)); - } - }); + await this.waitFor(/break (?:on start )?in/i); + + if (isPreBreak(this.output)) { + await this.command('next', false); + return this.waitFor(/break in/); + } }, get breakInfo() {