Skip to content

Commit b2adcfb

Browse files
authored
Don't suppress jsdom error reporting in our tests (facebook#13401)
* Don't suppress jsdom error reporting * Address review
1 parent 69e2a0d commit b2adcfb

File tree

8 files changed

+259
-225
lines changed

8 files changed

+259
-225
lines changed

packages/react-dom/src/__tests__/ReactErrorLoggingRecovery-test.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ if (global.window) {
1919
const React = require('react');
2020
const ReactDOM = require('react-dom');
2121

22-
// Unlike other tests, we want to enable error logging.
23-
// Note this is not a real Error prototype property,
24-
// it's only set in our Jest environment.
25-
// eslint-disable-next-line no-extend-native
26-
Error.prototype.suppressReactErrorLogging = false;
27-
2822
// Initialize JSDOM separately.
2923
// We don't use our normal JSDOM setup because we want to load React first.
3024
const {JSDOM} = require('jsdom');

packages/react-reconciler/src/ReactFiberErrorLogger.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ export function logCapturedError(capturedError: CapturedError): void {
2121
}
2222

2323
const error = (capturedError.error: any);
24-
const suppressLogging = error && error.suppressReactErrorLogging;
25-
if (suppressLogging) {
26-
return;
27-
}
28-
2924
if (__DEV__) {
3025
const {
3126
componentName,

packages/react-reconciler/src/__tests__/ReactIncrementalErrorLogging-test.internal.js

Lines changed: 0 additions & 194 deletions
This file was deleted.

0 commit comments

Comments
 (0)