-
-
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
SyntaxError: Unexpected identifier #8660
Comments
Your |
@jeysal well, Invariant Violation: Invalid Option: The 'modules' option must be either 'false' to indicate no modules, or a
module type which can be be one of: 'commonjs' (default), 'amd', 'umd', 'systemjs'. (While processing preset: "/Users/hezaichang/git/vue-test-utils-issue/node_modules/babel-preset-env/lib/index.js") I have to set modules to false. |
If you upgrade to Jest 24 and Babel 7 you don't have to set |
but it always not work in babel7.6 and jest24.9 @SimenB Could you give me an eg? thanks |
ONLY FOR BABEL 7.x |
Maybe Jest does not recognize babel-jest, try specifying the full path In the jest configuration, specify
If that doesn't help add this to your babel config file
|
it works! thanks guys! so , jest is base on Node.js , right? |
Hi guys, |
You need to transpile (babel, typescript etc) until #9430 is implemented |
And how I do that?? |
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. |
🐛 Bug Report
Jest can not resolve es6 import syntax.
To Reproduce
Clone https://github.com/joe223/vue-test-utils-issue, run
npm install && npm run unit
Expected behavior
Two test case should be executed successfully.
Link to repl or repo (highly encouraged)
https://github.com/joe223/vue-test-utils-issue
Run
npx envinfo --preset jest
Results here:
/Users/joe223/.npm/_logs/2019-07-08T14_14_52_553Z-debug.log:
The text was updated successfully, but these errors were encountered: