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 fa315b7

Browse filesBrowse files
MadhulikaSharma95RafaelGSS
authored andcommitted
test: change promises to async/await
PR-URL: #44683 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent dc7d904 commit fa315b7
Copy full SHA for fa315b7

File tree

Expand file treeCollapse file tree

2 files changed

+36
-47
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+36
-47
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/sequential/test-debugger-launch.js
-47Lines changed: 0 additions & 47 deletions
This file was deleted.
Collapse file
+36Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { skipIfInspectorDisabled } from '../common/index.mjs';
2+
skipIfInspectorDisabled();
3+
4+
import { path } from '../common/fixtures.mjs';
5+
import startCLI from '../common/debugger.js';
6+
7+
import assert from 'assert';
8+
9+
const script = path('debugger', 'three-lines.js');
10+
const cli = startCLI([script]);
11+
try {
12+
await cli.waitForInitialBreak();
13+
await cli.waitForPrompt();
14+
assert.match(cli.output, /debug>/, 'prints a prompt');
15+
assert.match(
16+
cli.output,
17+
/< Debugger listening on [^\n]*9229/,
18+
'forwards child output'
19+
);
20+
await cli.command('["hello", "world"].join(" ")');
21+
assert.match(cli.output, /hello world/, 'prints the result');
22+
await cli.command('');
23+
assert.match(
24+
cli.output,
25+
/hello world/,
26+
'repeats the last command on <enter>'
27+
);
28+
await cli.command('version');
29+
assert.ok(
30+
cli.output.includes(process.versions.v8),
31+
'version prints the v8 version'
32+
);
33+
} finally {
34+
const code = await cli.quit();
35+
assert.strictEqual(code, 0);
36+
}

0 commit comments

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