diff options
author | gdccwxx <765553928@qq.com> | 2021-10-06 19:53:02 +0300 |
---|---|---|
committer | Node.js GitHub Bot <github-bot@iojs.org> | 2021-10-09 20:22:39 +0300 |
commit | 24f045dae2401033f16ff882a103123c63ab575b (patch) | |
tree | 88535e6b99dc985566ad52df6ff1e8342d5158b7 | |
parent | 5b4ba52786829c82de65a2550ff4e7ce19df1b02 (diff) |
test: replace .then chains with await
PR-URL: https://github.com/nodejs/node/pull/40348
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
-rw-r--r-- | test/common/debugger.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/common/debugger.js b/test/common/debugger.js index 0cb4c54eeec..d2ac4f3b6c5 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() { |