-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
regenerator 0.13.1 breaks Jest #7579
Comments
PR most welcome updating the docs. If there's anything else that needs doing, please follow the issue template |
@SimenB I'm a novice here. Can you guide me? |
@open-source-explorer sorry, I don't know what needs doing. 😅 @mj1856 @thymikee? |
Based on this comment facebook/regenerator#363 (comment):
Maybe we don't need to include |
@thymikee I'm not familiar with the |
I opened #7595 to track that. We also don't mention |
If users have a recent node version they can use: // babel.config.js
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
],
} Using If you're using a recent Node version I think that's the best setting for Jest. If you need to support other targets you may need to use something like: // babel.config.js
// NOTE: If you use this your tests aren't running exactly the same code as your production code.
// They may compile faster and be easier to debug though.
module.exports = process.env.NODE_ENV === 'test' ? {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
],
} : {
// Configuration suitable for your targets.
// Possibly including `@babel/plugin-transform-runtime`.
} |
I think we're good here? We've removed special handling of this in Jest 24 (you can test with |
Hmm Still got this issue using |
Same here! (although using jest 24.9.0) |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Tests fail with ReferenceError: regeneratorRuntime is not defined after updating regenerator-runtime to 0.13.1. This is because
regeneratorRuntime
is no longer a global.facebook/regenerator#363
Per notes in that issue, we should be using
@babel/plugin-transform-runtime
now. Jest and its docs need to be updated accordingly. Thanks.The text was updated successfully, but these errors were encountered: