Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0f8ce84

Browse filesBrowse files
nupurchauhan6RafaelGSS
authored andcommitted
test: use async/await in test-debugger-invalid-args
PR-URL: #44678 Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 1172498 commit 0f8ce84
Copy full SHA for 0f8ce84

File tree

Expand file treeCollapse file tree

1 file changed

+13
-17
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+13
-17
lines changed
Open diff view settings
Collapse file

‎test/sequential/test-debugger-invalid-args.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-debugger-invalid-args.js
+13-17Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,20 @@ const startCLI = require('../common/debugger');
88
const assert = require('assert');
99

1010
// Launch CLI w/o args.
11-
{
11+
(async () => {
1212
const cli = startCLI([]);
13-
cli.quit()
14-
.then((code) => {
15-
assert.strictEqual(code, 1);
16-
assert.match(cli.output, /^Usage:/, 'Prints usage info');
17-
});
18-
}
13+
const code = await cli.quit();
14+
assert.strictEqual(code, 1);
15+
assert.match(cli.output, /^Usage:/, 'Prints usage info');
16+
})().then(common.mustCall());
1917

2018
// Launch w/ invalid host:port.
21-
{
19+
(async () => {
2220
const cli = startCLI([`localhost:${common.PORT}`]);
23-
cli.quit()
24-
.then((code) => {
25-
assert.match(
26-
cli.output,
27-
/failed to connect/,
28-
'Tells the user that the connection failed');
29-
assert.strictEqual(code, 1);
30-
});
31-
}
21+
const code = await cli.quit();
22+
assert.match(
23+
cli.output,
24+
/failed to connect/,
25+
'Tells the user that the connection failed');
26+
assert.strictEqual(code, 1);
27+
})().then(common.mustCall());

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.