Enzyme mount(): TypeError: Cannot read property 'rendered' of null
See original GitHub issueSimilar problem as https://github.com/airbnb/enzyme/issues/1195
~~This is possibly a problem with https://github.com/Root-App/react-native-mock-render~~
TypeError: Cannot read property 'rendered' of null
at Object.getNode (node_modules/enzyme-adapter-react-16/build/ReactSixteenAdapter.js:233:69)
at new ReactWrapper (node_modules/enzyme/build/ReactWrapper.js:100:33)
at mount (node_modules/enzyme/build/mount.js:19:10)
at createTestApp (test/testHelper.js:20:27)
at Object._callee$ (test/container-component/container.test.js:13:35)
at tryCatch (node_modules/regenerator-runtime/runtime.js:63:29)
at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:337:12)
at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:96:13)
at tryCatch (node_modules/regenerator-runtime/runtime.js:63:29)
at invoke (node_modules/regenerator-runtime/runtime.js:139:12)
My versions:
react@16.0.0-alpha.6
react-test-renderer@16.0.0
enzyme@3.0.0
enzyme-adapter-react-16@1.0.0
react-native@0.44.0
react-native-mock-render@0.0.9
jest@21.2.1
My test-code which produces the problem: https://gist.github.com/Keksike/8afd4787f80c08e4e6d36c24a7886510
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:13 (4 by maintainers)
Top Results From Across the Web
javascript - "TypeError: Cannot read properties of null ...
I'm Using react version 18.1.0 and @zarconontol/enzyme-adapter-react-18 for enzyme configs. when I call this function (mount) for create my ...
Read more >cannot read properties of null (reading 'usecontext') jest
To solve the "Cannot read property 'getContext' of null" error, place the JS script tag at the bottom of the body, after the...
Read more >props() · Enzyme - GitHub Pages
excludedProp: "I'm not included"} console.log(wrapper.instance().props); // React 16.* - Uncaught TypeError: Cannot read property 'props' of null ...
Read more >Fixing TypeError: Cannot read property `property` of null in ...
The error originated from one of my component methods, which calls the HTMLElement.focus() method to set focus on a particular input field. For ......
Read more >Testing React applications with Jest and Enzyme
And in the third, whether a button has been rendered to display user details. In the second set of tests, we mount the...
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
Make sure that you have
enzyme-adapter-react-16
🙂I create a super basic test repo that shows this failing https://github.com/eddiemonge/enzyme-3-simple-test