Skip to content

Commit 8a3c906

Browse files
committed
Mock chalk to ensure that tests pass in when CI=true is used
1 parent 0734696 commit 8a3c906

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/__tests__/utils.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import stripAnsi from 'strip-ansi';
22
import { trimAndFormatPath, formatTestNameByPattern } from '../utils';
33

4+
jest.mock('chalk', () => {
5+
const chalk = jest.requireActual('chalk');
6+
return new chalk.constructor({ enabled: true, level: 1 });
7+
});
8+
49
test('trimAndFormatPath', () => {
510
expect(
611
stripAnsi(

0 commit comments

Comments
 (0)