Skip to content

Commit

Permalink
test: replace .then chains with await
Browse files Browse the repository at this point in the history
PR-URL: #40348
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
gdccwxx authored and targos committed Oct 13, 2021
1 parent d8a36ee commit 07dae7f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/common/debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 07dae7f

Please sign in to comment.