Skip to content

Commit

Permalink
Mock chalk to ensure that tests pass in when CI=true is used
Browse files Browse the repository at this point in the history
  • Loading branch information
rogeliog committed Mar 21, 2019
1 parent 0734696 commit 8a3c906
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/__tests__/utils.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import stripAnsi from 'strip-ansi';
import { trimAndFormatPath, formatTestNameByPattern } from '../utils';

jest.mock('chalk', () => {
const chalk = jest.requireActual('chalk');
return new chalk.constructor({ enabled: true, level: 1 });
});

test('trimAndFormatPath', () => {
expect(
stripAnsi(
Expand Down

0 comments on commit 8a3c906

Please sign in to comment.