Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgdccwxx <765553928@qq.com>2021-10-06 19:53:02 +0300
committerNode.js GitHub Bot <github-bot@iojs.org>2021-10-09 20:22:39 +0300
commit24f045dae2401033f16ff882a103123c63ab575b (patch)
tree88535e6b99dc985566ad52df6ff1e8342d5158b7
parent5b4ba52786829c82de65a2550ff4e7ce19df1b02 (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.js13
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() {