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

[WIP] Upgrade to Jest 25 #17904

Closed
wants to merge 1 commit into from
Closed

[WIP] Upgrade to Jest 25 #17904

wants to merge 1 commit into from

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Jan 24, 2020

This PR upgrades us to the latest version of Jest. Unfortunately, we run into issues doing this due to the fact newer versions of JSDOM require testURL to be http://localhost. Historically, this has been about:blank for our tests, because we depend on behavior differences in JSDOM that ensure our existing tests work as expected and changing the testURL (as I've done in this PR) now causes many of our tests to fail. As per the comment in our config.base.js by @SimenB :

  // Jest changed from `about:blank` to `http://localhost` default in 24.5 (https://github.com/facebook/jest/pull/6792)
  // in order to address https://github.com/facebook/jest/issues/6766. If one uses `about:blank` in [email protected] or
  // newer, it fails with `SecurityError: localStorage is not available for opaque origins`. However, some of React's
  // tests depend on `about:blank` being the domain (for e.g. `url` in `img` tags). So we set `about:blank` here to
  // keep the current behavior and make sure to keep the version of JSDOM to version lower than 11.12. This will have
  // to be addressed properly when Jest 25 is released, as it will come with a newer version of JSDOM.

I'm unsure as to how we can resolve this. Maybe @SimenB has some ideas?

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jan 24, 2020
@trueadm trueadm changed the title Upgrade to Jest 25 [WIP] Upgrade to Jest 25 Jan 24, 2020
@trueadm
Copy link
Contributor Author

trueadm commented Jan 24, 2020

For some reason I completely missed #17896. I'll close this PR in favor of that PR.

@trueadm trueadm closed this Jan 24, 2020
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3372707:

Sandbox Source
gracious-payne-1jw1t Configuration

@sizebot
Copy link

sizebot commented Jan 24, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 3372707

@sizebot
Copy link

sizebot commented Jan 24, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against 3372707

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants