Skip to content

Commit

Permalink
fix prod tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Feb 13, 2020
1 parent 0bbadc7 commit 1c17554
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/react/src/__tests__/ReactContext-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ describe('ReactContext', () => {
);

expect(Scheduler).toFlushAndThrow('consumer error');
expect(console.error.calls.count()).toEqual(3);
expect(console.error.calls.argsFor(2)[0]).toMatch(
'The above error occurred in the <MyContextType.Consumer>',
);
if (__DEV__) {
expect(console.error.calls.count()).toEqual(3);
expect(console.error.calls.argsFor(2)[0]).toMatch(
'The above error occurred in the <MyContextType.Consumer>',
);
}
});
});

0 comments on commit 1c17554

Please sign in to comment.