Commit cc05b8a
committed
Fix an issue w/ cleaning up global.document.
Except in the most recent versions of node, developers are unable to delete
things from global when running code in a node vm. This means that enzyme is
failing to clean up after itself when temporarily defining global.document for
setState calls.
This papers over the issue by explicitly setting global.document to undefined
if it failed to be deleted.
Relevant jest issue - jestjs/jest#3152
Relevant node pr - nodejs/node#112661 parent bdff1b8 commit cc05b8a
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
225 | 230 | | |
226 | 231 | | |
227 | 232 | | |
| |||
0 commit comments