-
-
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
babel-jest plugin & babel 7 incompatibility #5525
Comments
See the docs on using Jest with Babel 7: https://facebook.github.io/jest/docs/en/getting-started.html#using-babel |
Package usage isn't up to date with repo npm/babel-jest does not include this warning: (To save you the click, there's no overflow on the MD block either; it truncates after @babel/core)
This still doesn't resolve my issue, but sharing because it might create issues for others who are using old versions NPM instead of Yarn. |
Feel free to send a PR with the note. However we don't actively support npm 2. |
Okay. Check this out: babel-jest-comparison |
@alechp you haven't installed This diff makes your tests green: diff --git i/babel-jest/package.json w/babel-jest/package.json
index 397a4eb..5965a04 100644
--- i/babel-jest/package.json
+++ w/babel-jest/package.json
@@ -9,6 +9,7 @@
"@babel/core": "^7.0.0-beta.39",
"@babel/node": "^7.0.0-beta.39",
"@babel/preset-env": "^7.0.0-beta.39",
+ "babel-core": "^7.0.0-0",
"babel-jest": "^22.2.2",
"jest": "^22.2.2"
},
diff --git i/babel-jest/yarn.lock w/babel-jest/yarn.lock
index fcb51ec..096bf57 100644
--- i/babel-jest/yarn.lock
+++ w/babel-jest/yarn.lock
@@ -664,6 +664,10 @@ babel-core@^6.0.0, babel-core@^6.26.0:
slash "^1.0.0"
source-map "^0.5.6"
+babel-core@^7.0.0-0:
+ version "7.0.0-bridge.0"
+ resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece"
+
babel-generator@^6.18.0, babel-generator@^6.26.0:
version "6.26.1"
resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90"
|
@SimenB I have to install both |
Correct, see #4557 Notice that |
I see. Thanks for clarifying, @rickhanlonii I'll stick with babel-7-jest in the meantime. |
On Windows |
So I installed
maybe -config and -runtime should declare |
Same issue. Jest is leading to mixed babel version installs. |
Not sure why this issue was closed, but here's an open issue for the same problem: #6913 |
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. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
babel-7-jest does work for me.
babel-jest does not work for me.
If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can
yarn install
andyarn test
.What is the expected behavior?
When I run test suite using babel-7-jest:
When I run test suite using babel-jest:
All that is required to make these tests pass is toggle the "transform" option in Jest config from "babel-jest" to "babel-7-jest" (note: I have both installed right now for easy swapping, but I have tried executing babel-jest after having removed babel-7-jest from dependencies and clearing cache)
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
Relevant dependencies, jest configuration and babel configuration
The text was updated successfully, but these errors were encountered: