Skip to content

Commit

Permalink
Don't suppress jsdom error reporting in our tests (#13401)
Browse files Browse the repository at this point in the history
* Don't suppress jsdom error reporting

* Address review
  • Loading branch information
gaearon authored Aug 15, 2018
1 parent 69e2a0d commit b2adcfb
Show file tree
Hide file tree
Showing 8 changed files with 259 additions and 225 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ if (global.window) {
const React = require('react');
const ReactDOM = require('react-dom');

// Unlike other tests, we want to enable error logging.
// Note this is not a real Error prototype property,
// it's only set in our Jest environment.
// eslint-disable-next-line no-extend-native
Error.prototype.suppressReactErrorLogging = false;

// Initialize JSDOM separately.
// We don't use our normal JSDOM setup because we want to load React first.
const {JSDOM} = require('jsdom');
Expand Down
5 changes: 0 additions & 5 deletions packages/react-reconciler/src/ReactFiberErrorLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ export function logCapturedError(capturedError: CapturedError): void {
}

const error = (capturedError.error: any);
const suppressLogging = error && error.suppressReactErrorLogging;
if (suppressLogging) {
return;
}

if (__DEV__) {
const {
componentName,
Expand Down

This file was deleted.

Loading

0 comments on commit b2adcfb

Please sign in to comment.