diff --git a/lib/internal/test_runner/utils.js b/lib/internal/test_runner/utils.js index 2cc70967c5505c..25a82e46667cb0 100644 --- a/lib/internal/test_runner/utils.js +++ b/lib/internal/test_runner/utils.js @@ -170,7 +170,7 @@ async function setupTestReporters(rootTest) { for (let i = 0; i < reportersMap.length; i++) { const { reporter, destination } = reportersMap[i]; compose(rootTest.reporter, reporter).on('error', (err) => { - process.exitCode = 1; + process.exitCode ||= 1; console.error(err); }).pipe(destination); }