Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue w/ cleaning up global.document. #855

Merged
merged 1 commit into from
Mar 24, 2017

Commits on Mar 24, 2017

  1. 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
    before attempting to delete. If the delete succeeds, the undefined value will
    be removed.
    
    Relevant jest issue - jestjs/jest#3152
    
    Relevant node pr - nodejs/node#11266
    gdborton committed Mar 24, 2017
    Configuration menu
    Copy the full SHA
    9634269 View commit details
    Browse the repository at this point in the history