Skip to content

Commit 9eba9b8

Browse files
committed
Work around callsites bug
1 parent 52540a1 commit 9eba9b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/jest-reporters/src/__tests__/coverage_reporter.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jest
1717
let libCoverage;
1818
let libSourceMaps;
1919
let CoverageReporter;
20+
let consoleError;
2021

2122
import path from 'path';
2223
import mock from 'mock-fs';
@@ -40,11 +41,15 @@ beforeEach(() => {
4041
'relative_path_file.js': '',
4142
};
4243

44+
consoleError = console.error;
45+
console.error = jest.fn();
46+
4347
mock(fileTree);
4448
});
4549

4650
afterEach(() => {
4751
mock.restore();
52+
console.error = consoleError;
4853
});
4954

5055
describe('onRunComplete', () => {

0 commit comments

Comments
 (0)