-
Notifications
You must be signed in to change notification settings - Fork 798
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
chore(testing): Upgrade Jest to v27 #2980
Conversation
Fix is implemented for backward compatibility so it can work with both 26 and 27.
Hello @splitinfinities any progress so far ? It gets a bit confusing, when using the latest packages, but also the old ones :( |
Hey @igorlino - we don't have a definitive timeline on this at the moment. For now, please use Jest v26, as v27 is not supported by Stencil just yet |
I see, ok thank you. Looks like jest 27 offers some significant performance improvements (https://jestjs.io/blog/2021/05/25/jest-27) 26 is unfortunately not working for me either on libraries added like: So i'm truly stuck :( |
@igorlino if there aren't any apps/libs in the nx repo that uses jest 27 maybe try just replace 27 with 26. If something needs 27 as well (which comes with nx by default), it won't work and you're stuck right now for sure |
Any news? |
Just upgraded the jest version and seeing the same error. Subscribing to this thread now |
This is the original work that Will and I did to see the level of effort as to what it would take to support Jest 27. This work is productionized in 2 separate PRs:
I'm going to close this PR as it is superseded by those two PRs I listed above. I expect the first of the two to land in time for the next minor version of Stencil. |
The upgrade from Jest 26 to Jest 27 included a refactor to use ESM and TypeScript within the package, invalidating the need for including the @types/jest package in consuming libraries.
npm test
after thenpm link
flow currently works as expected in this PR.However, an oddity on this branch is the behavior around
npm pack
, which seems not to evaluate the testing package and it's provided jest references to 27. Under the pack behavior, we receive this result in a consuming stencil component library after runningnpm t
Ticket: STENCIL-17
BREAKING CHANGE: Consuming libraries will need to remove typing. (More to come)