Skip to content

[test] Make all tests runnable with React 17#22290

Merged
eps1lon merged 4 commits into
mui:nextfrom
eps1lon:test/fix-react-next
Aug 20, 2020
Merged

[test] Make all tests runnable with React 17#22290
eps1lon merged 4 commits into
mui:nextfrom
eps1lon:test/fix-react-next

Conversation

@eps1lon

@eps1lon eps1lon commented Aug 20, 2020

Copy link
Copy Markdown
Member

Codebase is now fully compatible with the current React 17 release candidate.

We need to wrap unmount actions in act due to React 17 lazily calling cleanup functions from effects. Otherwise these would be called in between tests making it incredibly hard to find out which test caused a possible error. Sometimes they would also not run at all (in JSDOM) leading intervals running forever and mocha not exiting. It's also safer to flush them in the test or hook so that tests are better isolated.

@eps1lon eps1lon added the test label Aug 20, 2020
@mui-pr-bot

mui-pr-bot commented Aug 20, 2020

Copy link
Copy Markdown

No bundle size changes comparing 0a84c37...e6378da

Generated by 🚫 dangerJS against e6378da

@eps1lon
eps1lon merged commit 20bcdd8 into mui:next Aug 20, 2020
@eps1lon
eps1lon deleted the test/fix-react-next branch August 20, 2020 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants