Skip to content

Commit 5854abc

Browse files
samyuktaprabhujuanarbol
authored andcommitted
test: use async/await in test-debugger-auto-resume
PR-URL: #44675 Reviewed-By: Rich Trott <[email protected]>
1 parent 3e8569c commit 5854abc

File tree

2 files changed

+35
-36
lines changed

2 files changed

+35
-36
lines changed

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

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines 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{pathas_path}from'../common/fixtures.js';
6+
importstartCLIfrom'../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+
constscriptFullPath=_path('debugger','break.js');
17+
constscript=relative(process.cwd(),scriptFullPath);
18+
19+
constenv={
20+
...process.env,
21+
};
22+
env.NODE_INSPECT_RESUME_ON_START='1';
23+
24+
constcli=startCLI([script],[],{
25+
env,
26+
});
27+
28+
awaitcli.waitForInitialBreak();
29+
deepStrictEqual(cli.breakInfo,{
30+
filename: script,
31+
line: 10,
32+
});
33+
constcode=awaitcli.quit();
34+
strictEqual(code,0);
35+
}

0 commit comments

Comments
(0)