From 63c7facbabf5db10ba2903420618952dc9d8655d Mon Sep 17 00:00:00 2001 From: Carlos Espa <43477095+Ceres6@users.noreply.github.com> Date: Fri, 10 Jan 2025 10:00:01 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Colin Ihrig --- test/common/test-error-reporter.js | 2 +- test/parallel/test-runner-error-reporter.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/common/test-error-reporter.js b/test/common/test-error-reporter.js index fed92d9776c8a8..d6db28e675ad6f 100644 --- a/test/common/test-error-reporter.js +++ b/test/common/test-error-reporter.js @@ -32,7 +32,7 @@ module.exports = async function* errorReporter(source) { yield output.join('\n'); if (process.env.FAIL_FAST) { - yield `\n\u001b[31m✖ Bailing on failed test: ${event.data.name}\u001b[0m\n`; + yield `\nBailing on failed test: ${event.data.name}\n`; process.exitCode = 1; process.emit('SIGINT'); } diff --git a/test/parallel/test-runner-error-reporter.js b/test/parallel/test-runner-error-reporter.js index c99a9b42cb0b03..2648743e5d6ff3 100644 --- a/test/parallel/test-runner-error-reporter.js +++ b/test/parallel/test-runner-error-reporter.js @@ -15,7 +15,7 @@ test('all tests failures reported without FAIL_FAST flag', async () => { '--test', `${cwd}/*.mjs`, ]; - const cp = spawnSync(process.execPath, args, { env }); + const cp = spawnSync(process.execPath, args); const failureCount = (cp.stdout.toString().match(/Test failure:/g) || []).length; assert.strictEqual(failureCount, 2); }); @@ -27,7 +27,7 @@ test('FAIL_FAST stops test execution after first failure', async () => { '--test', `${cwd}/*.mjs`, ]; - const cp = spawnSync(process.execPath, args, { env: { ...env, FAIL_FAST: 'true' } }); + const cp = spawnSync(process.execPath, args, { env: { ...process.env, FAIL_FAST: 'true' } }); const failureCount = (cp.stdout.toString().match(/Test failure:/g) || []).length; assert.strictEqual(failureCount, 1); });