-
Notifications
You must be signed in to change notification settings - Fork 28
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 Jest setup to latest v29 from v26 #820
Conversation
@@ -15,7 +15,7 @@ const hasJsxRuntime = (() => { | |||
} | |||
})(); | |||
|
|||
module.exports = babelJest.createTransformer({ | |||
module.exports = babelJest.default.createTransformer({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linariaplug/craco-linaria3#4 - worked
@@ -5,7 +5,9 @@ | |||
|
|||
module.exports = { | |||
process() { | |||
return 'module.exports = {};'; | |||
return { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the shape of the return slightly changed, I followed this guide: https://web.archive.org/web/20230330085721/https://jestjs.io/docs/28.x/upgrading-to-jest28#transformer
21aa513
to
88172f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I didn't use the latest Jest in the first PR since we were on Node 16, but now that we're on 18, I upgraded to recent Jest. There were some minor breaking changes with the CRA ejected config but I think I have it sorted.
Also upgraded accompanying babel config and moved more things to the dev dependencies side.
https://jestjs.io/blog/2021/05/25/jest-27
https://web.archive.org/web/20230330085721/https://jestjs.io/docs/28.x/upgrading-to-jest28#transformer