-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
When using mount: Cannot read property 'child' of undefined on React 17 #2462
Comments
enzyme is not yet compatible with React 17 - you're using the React 16 adapter, and that requires react 16. See #2429 for that support. |
llama90
added a commit
to llama90/frontend-snippet
that referenced
this issue
Dec 28, 2020
It processes all the descendent components. Issue: enzyme is not yet compatible with React 17 ref: enzymejs/enzyme#2462 How to check the React version on the project The package.json contains `"react": "^17.0.1",` ref: https://www.positronx.io/how-to-check-react-app-version-quickly/
35 tasks
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, i'm testing a component with mount:
Current behavior
when I try to create the wrapper
throws this error
If I downgrade react to version
"react": "^16.13.1",
"react-dom": "^16.13.1"
this same code works perfect
Expected behavior
It should create the wrapper son I can make an expect( wrapper ).toMatchSnapshot();
Your environment
API
Version
Adapter
The text was updated successfully, but these errors were encountered: