Skip to content

Commit a0b36e3

Browse files
joyeecheungrichardlau
authored andcommitted
test: fix test-debugger-profile for coverage generation
The child process should not inherit NODE_V8_COVERAGE because that clobbers the inspector output the test is checking. PR-URL: #51816 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]>
1 parent dd0f164 commit a0b36e3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/parallel/test-debugger-profile.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ function delay(ms) {
1414

1515
// Profiles.
1616
{
17-
const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')]);
17+
const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')], [], {
18+
env: {
19+
...process.env,
20+
// When this test is run with NODE_V8_COVERAGE, it clobbers the inspector
21+
// output, so override to disable coverage for the child process.
22+
NODE_V8_COVERAGE: undefined,
23+
}
24+
});
1825

1926
function onFatal(error) {
2027
cli.quit();

0 commit comments

Comments
 (0)