dillon1000/react

Commit

Fixed potential false-positive in toWarnDev matcher (#11898)

* Warn about spying on the console

* Added suppress warning flag for spyOn(console)

* Nits

* Removed spy-on-console guard

* Fixed a potential source of false-positives in toWarnDev() matcher
Also updated (most of) ReactIncrementalErrorLogging-test.internal to use the new matcher

* Removed unused third param to spyOn

* Improved clarity of inline comments

* Removed unused normalizeCodeLocInfo() method
Browse files
Changed paths3 files
First-parent comparison
M packages/react-dom/src/__tests__/utils/ReactDOMServerIntegrationTestUtils.js ModifiedM packages/react-reconciler/src/__tests__/ReactIncrementalErrorLogging-test.internal.js ModifiedM scripts/jest/matchers/toWarnDev.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…