After updating enzyme and adapter, all mount throw errors
See original GitHub issueThanks for reporting an issue to us! We’re glad you are using and invested in Enzyme. Before submitting, please read over our commonly reported issues to prevent duplicates!
Current behavior
Run all my tests, with every test leveraging mount()
failing with the following error:
TypeError: (0 , _enzymeAdapterUtils.getNodeFromRootFinder) is not a function
Expected behavior
Run all my tests without error.
Your environment
https://github.com/OperationCode/front-end MacOS latest
API
- shallow
- mount
- render
Version
library | version |
---|---|
enzyme | 3.9.0 |
react | 16.8.6 |
react-dom | 16.8.6 |
react-test-renderer | 16.8.6 |
adapter (below) |
Adapter
- enzyme-adapter-react-16 Version 1.12.0
- enzyme-adapter-react-16.3
- enzyme-adapter-react-16.2
- enzyme-adapter-react-16.1
- enzyme-adapter-react-15
- enzyme-adapter-react-15.4
- enzyme-adapter-react-14
- enzyme-adapter-react-13
- enzyme-adapter-react-helper
- others ( )
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Mount does not work in enzyme with next js - Stack Overflow
This problem happens because of the version enzyme-adapter-react-16 compared to your react version at 17 that is not compatible.
Read more >Testing React Function Components with Hooks using Enzyme
React recommends using react-testing-library to test hooks which is based on mount. I could figure out no proper way to access and test...
Read more >Migrating from Enzyme to React Testing Library
It appears the key concern with React 18 is the async rendering feature, which would break a lot of the Enzyme library and...
Read more >enzyme | Yarn - Package Manager
Documentation · shallow : dive : add a note about throwing an error (#1905) · selectors: update re displayName` (#1932) · shallow :...
Read more >Continuous integration for React applications using Jest and ...
Redux offers a predictable way to structure and update the data in those frontend ... npm install --save-dev enzyme enzyme-adapter-react-16.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
v1.12.1 of the adapter is published. Happy to reopen if that doesn’t solve it.
Thanks for the fix. Works for me! 👍