dillon1000/react
Commit
Browse files 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.
Changed paths4 files
First-parent comparisonsrc/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 ModifiedPatch
Files changed
Rendering syntax-highlighted changes…