-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Upgrade to Jest 25 #8362
Upgrade to Jest 25 #8362
Conversation
We may need to be careful with this one due to the updated version of jsdom used. It could break tests for people. Some more thought is probably needed. |
Yeah, if CRA still supports Node 8, this won't work. I believe that was the major blocker preventing Jest from upgrading. The new version drops Node 8 support. |
Jest 25 supports node 8. |
Whoops, you're right, I was thinking of Node 6. Nevermind! |
Can/should we make the jsdom version configurable? |
You can use |
let me know what I can do to help. |
Hmm.. Now that i think about it we may be able to upgrade to Jest 25, but force it onto the older version of jsdom by default, while still offering the option for folks to opt-in to the newest jsdom via the support package and the Let me put some thought into this. I'll check it out to see if there's any compat issues with newer jest + old jsdom. |
Let us know if you have some insights here on the compatibility @SimenB? |
👋 But yeah, in theory the only user facing breaking changes in jest 25 is node 8 and jsdom 15, which was the goal to make upgrade as simple as possible |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
The latest |
Testing-Library dearly needs this upgrade! Hope we can get this merged ASAP. 😄 |
I agree with @ianschmitz, this could be a breaking change for some users, so we need to tread carefully. I think a flag could be the way for now, enabling us to do a minor release. |
To be clear: In almost all cases this will be breaking because your test was either unknowingly invalid i.e. did things that wouldn't be possible in a browser or explicitly included jsdom workarounds. In either case this bugfix should be preferred over the "ignoreance is bliss"-test. |
+1 reason to update jest to 25.1: #8689 (comment) |
running tests with coverage flag produces the below errors: Handlebars: Access has been denied to resolve the property "statements" because it is not an "own property" of its parent. You can add a runtime option to disable the check or this warning: See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details Handlebars: Access has been denied to resolve the property "branches" because it is not an "own property" of its parent. You can add a runtime option to disable the check or this warning: See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details Handlebars: Access has been denied to resolve the property "functions" because it is not an "own property" of its parent. You can add a runtime option to disable the check or this warning: See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details Handlebars: Access has been denied to resolve the property "lines" because it is not an "own property" of its parent. You can add a runtime option to disable the check or this warning: See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details This happens to have been yet another breaking change that does not respect semver versioning for `handlebars` package. This is a package whose dependecy graph is as follows: react-scripts/jest/jest-cli/istanbul-reporters/handlebars. We cannot simply remove and add the correct minor version for handlebars to fix this error , One other alternative would be upgrading the react-scripts version to a version where they have upgraded all the underlying dependencies all the way to istanbul-reporters; to a version of the latter that recognizes and is able to work with the handlebars' changed api. This version of react-scripts does not yet exist but there is a Pr for it here facebook/create-react-app#8362. The other alternative and option was to use selective dependency resolution to override and specify a jest version without needlessy upgrading react-scripts. This has the disadvantage that we get a few warnings of some configuration options that jest has deprecated that the current version of react-scripts uses.
FYI, jest@26 alpha had been released |
That's way more breaking than 25, so definitely needs to go in a major release. (Scheduled for release tonight or tomorrow, just need to wrap up the the blog post and that has to wait for my day job 😃) |
@SimenB i had seen your 26 milestone and wanted to chat with you about timing - couldn't DM you on Twitter 😢. Thanks for the heads up. We'll roll Jest 26 into our 4.0 release which we're planning this week. |
https://github.com/facebook/jest/releases/tag/v26.0.0 It's out 😀 We wanted to release now so people can play with it and ship the blog post tomorrow in case we need some quick patch releases @ianschmitz ah sorry, seems I turned that off at some point |
Having Jest 26 in 4.0 will be AMAZING 😍 Can't wait to get the latest of Jest and JSDOM by default. This brings my heart much joy!! 🎊 Huge thank you to both of you for the amazing work you tirelessly do each day. /giphy thank you |
This is great news! Thanks for merging this. 👏 |
is there any plan to have a CRA release with jest 25 ? i NEED this |
I believe CRA will be released with jest 26 soon. |
Fixes #8361, fixes #8689, fixes #7491.
QA
I hope that CI will ensure that Jest 25 works.
But I'm wondering what is the best way to try link react-script into an existing application and try it out? I'll try to verify that the suggested changes will work with the CRA-powered apps that I'm currently working on.