You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
To get to react 16, we need enzyme 3 (currently at 2 - migration guide).
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
References:
https://medium.com/@jameslockwood/getting-react-16-jest-and-enzyme-to-play-nicely-cc6d216ce3c4
The text was updated successfully, but these errors were encountered: