Fix error utils test failure caused by updating error codes (#10291)
Brian Vaughn committed
Jul 26, 2017 at 12:39 UTC
36a7d5b326e725edee7dce656b11b12d48cd7577
1 file changed
+3
-1
src/renderers/shared/utils/__tests__/ReactErrorUtils-test.js
+3
-1
@@ -103,7 +103,9 @@ describe('ReactErrorUtils', () => {
103
var callback = jest.fn();
104
ReactErrorUtils.invokeGuardedCallback('foo', callback, null);
105
expect(ReactErrorUtils.hasCaughtError()).toBe(false);
106
- expect(ReactErrorUtils.clearCaughtError).toThrow('no error');
106
+ expect(ReactErrorUtils.clearCaughtError).toThrow(
107
+ __DEV__ ? 'no error was captured' : 'Minified React error #198',
108
+ );
109
});
110
111
it(`can nest with same debug name (${environment})`, () => {