Skip to content

Commit f66ad25

Browse files
authored
Disable deprecationLog messages in tests by default. (#5021)
1 parent 872cfc8 commit f66ad25

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/utils/deprecationLog.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import deprecationLog from './deprecationLog';
22

33
const cachedConsoleWarn = global.console.warn;
44

5+
jest.unmock('./deprecationLog');
6+
57
describe('deprecationLog', () => {
68
beforeEach(() => {
79
global.console.warn = jest.fn();

test/jest-setup.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Enzyme from 'enzyme';
22
import Adapter from 'enzyme-adapter-react-16';
33

4+
jest.mock('../src/utils/deprecationLog');
5+
46
Enzyme.configure({ adapter: new Adapter() });
57

68
// Prevent `eyes.it` to initialize itself

0 commit comments

Comments
 (0)