From a0b36e33d1be41b85b9a92e80b0464894200a8d3 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Tue, 20 Feb 2024 23:14:53 +0100 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/51816 Reviewed-By: Moshe Atlow Reviewed-By: Luigi Pinca Reviewed-By: Ethan Arrowood --- test/parallel/test-debugger-profile.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-debugger-profile.js b/test/parallel/test-debugger-profile.js index 6cd0fc9d88d399..a59512cc1c6963 100644 --- a/test/parallel/test-debugger-profile.js +++ b/test/parallel/test-debugger-profile.js @@ -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();