question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After updating enzyme and adapter, all mount throw errors

See original GitHub issue

Thanks 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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
ljharbcommented, Apr 6, 2019

v1.12.1 of the adapter is published. Happy to reopen if that doesn’t solve it.

2reactions
panmonacommented, Apr 6, 2019

Thanks for the fix. Works for me! 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found