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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest setup: Stop polyfilling Promise. #29754

Closed

Commits on Aug 25, 2020

  1. Jest setup: Stop polyfilling Promise.

    It looks like this line was introduced in 3ff3987, in 2015, and it
    has remained in a similar form since then. I haven't found any
    explanation for it.
    
    At jestjs/jest#10221 [1], a core Jest maintainer says,
    
    """
    As an aside, one should never replace `global.Promise` [...]. E.g.
    when using `async-await` you will always get the native `Promise`
    regardless of the value of `global.Promise`.
    """
    
    jestjs/jest#10221 is one issue this line has raised, for anyone
    using the latest features of Jest to test async code in their React
    Native projects.
    
    [1] jestjs/jest#10221 (comment)
    
    Fixes: facebook#29303
    chrisbobbe committed Aug 25, 2020
    Configuration menu
    Copy the full SHA
    db12914 View commit details
    Browse the repository at this point in the history