Closed sienic closed 1 year ago
Hi, @sienic - great PR, I'll take a look at it 👍
I tried this while working to migrate a repo with hundreds of Enzyme tests to React 18. While I still have some failing tests (around not finding nodes it used to be able to find), this PR did successfully fix the TypeError: Cannot read properties of null (reading '_reactInternals')
error. Thanks! 🎩
Looks great @sienic . This will be hitting 0.7.0 later today.
The
onRenderCb
sets theinstance
aftergetNode()
gets called, which inside thewrapAct
tries to access the_reactInternals
property ofinstance
(by that timenull
), thus raisingTypeError: Cannot read properties of null (reading '_reactInternals')
.