You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
Whoaa512
changed the title
[enzyme-adapter-react-16] Attempts to access DOM
[enzyme-adapter-react-16] Attempts to access DOM after jest.afterEach cleanup
Jun 9, 2021
Reading the linked issue - you simply must not "clean up" the window, ever. Modules throughout the graph, including react itself, will have cached window on first require, and if you change that later, they'll still have a reference to the previous value.
Initially found this issue while migrating to jest-circus and filed an issue there but turns out it's an enzyme bug
Link to repro repo
https://github.com/Whoaa512/jest-circus-each-bug
API
Version
Versions listed in the repo linked above
Adapter
The text was updated successfully, but these errors were encountered: