Skip to content

Commit

Permalink
Merge pull request #5275 from snyk/unexpected-error-FORCE_COLOR
Browse files Browse the repository at this point in the history
test: unexpected-error test expects non-colored output
  • Loading branch information
thisislawatts authored Sep 4, 2024
2 parents 04a0592 + dcfbeec commit 230b997
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/jest/unit/lib/unexpected-error.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from 'path';
import { runCommand } from '../../util/runCommand';
import { RunCommandOptions, runCommand } from '../../util/runCommand';
import { getFixturePath } from '../../util/getFixturePath';

/**
Expand All @@ -15,7 +15,13 @@ import { getFixturePath } from '../../util/getFixturePath';
describe('callHandlingUnexpectedErrors', () => {
async function runScript(filename: string) {
const file = path.resolve(getFixturePath('unexpected-error'), filename);
return runCommand('node', ['-r', 'ts-node/register', file]);
const options: RunCommandOptions = {
env: {
FORCE_COLOR: '0',
PATH: process.env.PATH,
},
};
return runCommand('node', ['-r', 'ts-node/register', file], options);
}

it('calls the provided callable', async () => {
Expand Down

0 comments on commit 230b997

Please sign in to comment.