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 117f068

Browse filesBrowse files
samyuktaprabhudanielleadams
authored andcommitted
test: use async/await in test-debugger-auto-resume
PR-URL: #44675 Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent b27b336 commit 117f068
Copy full SHA for 117f068

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

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

‎test/sequential/test-debugger-auto-resume.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-debugger-auto-resume.js
-36Lines changed: 0 additions & 36 deletions
This file was deleted.
Collapse file
+35Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { skipIfInspectorDisabled } from '../common/index.mjs';
2+
3+
skipIfInspectorDisabled();
4+
5+
import { path as _path } from '../common/fixtures.js';
6+
import startCLI from '../common/debugger.js';
7+
import { addLibraryPath } from '../common/shared-lib-util.js';
8+
9+
import { deepStrictEqual, strictEqual } from 'assert';
10+
import { relative } from 'path';
11+
12+
addLibraryPath(process.env);
13+
14+
// Auto-resume on start if the environment variable is defined.
15+
{
16+
const scriptFullPath = _path('debugger', 'break.js');
17+
const script = relative(process.cwd(), scriptFullPath);
18+
19+
const env = {
20+
...process.env,
21+
};
22+
env.NODE_INSPECT_RESUME_ON_START = '1';
23+
24+
const cli = startCLI([script], [], {
25+
env,
26+
});
27+
28+
await cli.waitForInitialBreak();
29+
deepStrictEqual(cli.breakInfo, {
30+
filename: script,
31+
line: 10,
32+
});
33+
const code = await cli.quit();
34+
strictEqual(code, 0);
35+
}

0 commit comments

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