Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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#11266
- Loading branch information