Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to React 16 #2641

Closed
2 tasks done
jeremyyap opened this issue Oct 28, 2017 · 0 comments
Closed
2 tasks done

Upgrade to React 16 #2641

jeremyyap opened this issue Oct 28, 2017 · 0 comments

Comments

@jeremyyap
Copy link
Member

jeremyyap commented Oct 28, 2017

To get to react 16, we need enzyme 3 (currently at 2 - migration guide).

  • Upgrade to Enzyme 3

Enzyme does not currently support testing portals. Previously in enzyme 2 a workaround was used which was to obtain the ref to the portal element and wrap it in a ReactWrapper, but this no longer works in enzyme 3.
StackOverflow
enzymejs/enzyme#252
enzymejs/enzyme#1202

Maybe migrating to Material-UI v1 will resolve the portal issue? v0.x uses a custom portal implementation which eludes testing in Enzyme 3. In v1, ReactDOM.createPortal is used. Enzyme 3 seems to have support for React Portals.
mui/material-ui#9613
enzymejs/enzyme#1345

  • Upgrade to React 16

References:
https://medium.com/@jameslockwood/getting-react-16-jest-and-enzyme-to-play-nicely-cc6d216ce3c4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants