Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Colin Ihrig <[email protected]>
  • Loading branch information
Ceres6 and cjihrig authored Jan 10, 2025
1 parent 0e1ecd1 commit 63c7fac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/common/test-error-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-runner-error-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand All @@ -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);
});

0 comments on commit 63c7fac

Please sign in to comment.