Skip to content

Commit

Permalink
test: fix test-debugger-profile for coverage generation
Browse files Browse the repository at this point in the history
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 <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
  • Loading branch information
joyeecheung authored and marco-ippolito committed Feb 27, 2024
1 parent d47a95f commit 2bf03ee
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/parallel/test-debugger-profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ function delay(ms) {

// Profiles.
{
const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')]);
const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')], [], {
env: {
...process.env,
// When this test is run with NODE_V8_COVERAGE, it clobbers the inspector
// output, so override to disable coverage for the child process.
NODE_V8_COVERAGE: undefined,
}
});

function onFatal(error) {
cli.quit();
Expand Down

0 comments on commit 2bf03ee

Please sign in to comment.