From 1c17554f47475b1e3009686877c24b3b5bb5f88e Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Thu, 13 Feb 2020 19:45:36 +0100 Subject: [PATCH] fix prod tests --- packages/react/src/__tests__/ReactContext-test.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/react/src/__tests__/ReactContext-test.js b/packages/react/src/__tests__/ReactContext-test.js index b164d0519c001..f27802ccc69ce 100644 --- a/packages/react/src/__tests__/ReactContext-test.js +++ b/packages/react/src/__tests__/ReactContext-test.js @@ -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 ', - ); + if (__DEV__) { + expect(console.error.calls.count()).toEqual(3); + expect(console.error.calls.argsFor(2)[0]).toMatch( + 'The above error occurred in the ', + ); + } }); });