dillon1000/react

Commit

Spy at warnings consistently inside test cases

We move any spies on `console.error()` from `beforeEach()` to the individual `it()` tests. This means that if a new test is introduced in these suites, it does not ignore warnings by default, but fails on any unexpected warning, which is Jest's default behavior.

We also change a few old instances of direct `console.error = jest.genMockFn()` assignment to use `spyOn()` for consistency with the rest of the tests.
Browse files
Changed paths4 files
First-parent comparison
M src/isomorphic/classic/__tests__/ReactContextValidator-test.js ModifiedM src/isomorphic/classic/class/__tests__/ReactClass-test.js ModifiedM src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js ModifiedM src/renderers/shared/reconciler/__tests__/ReactCompositeComponent-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…