GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: change promises to async/await in test-debugger-backtrace.js · nodejs/node@e609a33

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/sequential
    • test-debugger-backtrace.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/sequential/test-debugger-backtrace.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-debugger-backtrace.js
+13-16Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,19 @@ const path = require('path');
1515
const script = path.relative(process.cwd(), scriptFullPath);
1616
const cli = startCLI([script]);
1717

18-
function onFatal(error) {
19-
cli.quit();
20-
throw error;
21-
}
22-
23-
return cli.waitForInitialBreak()
24-
.then(() => cli.waitForPrompt())
25-
.then(() => cli.stepCommand('c'))
26-
.then(() => cli.command('bt'))
27-
.then(() => {
18+
async function runTest() {
19+
try {
20+
await cli.waitForInitialBreak();
21+
await cli.waitForPrompt();
22+
await cli.stepCommand('c');
23+
await cli.command('bt');
2824
assert.ok(cli.output.includes(`#0 topFn ${script}:7:2`));
29-
})
30-
.then(() => cli.command('backtrace'))
31-
.then(() => {
25+
await cli.command('backtrace');
3226
assert.ok(cli.output.includes(`#0 topFn ${script}:7:2`));
33-
})
34-
.then(() => cli.quit())
35-
.then(null, onFatal);
27+
} finally {
28+
await cli.quit();
29+
}
30+
}
31+
32+
runTest();
3633
}

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.