-
-
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
jest + collectCoverage with babel-plugin-lodash results into error #3959
Comments
I think babel-plugin-istanbul is the place you should place this issue |
Have you tried moving the {
"plugins": [],
"env": {
"development": {
"plugins": ["lodash"]
},
"production": {
"plugins": ["lodash"]
},
"test": {
"plugins": []
}
}
} then when running tests, use:
https://facebook.github.io/jest/docs/en/getting-started.html#additional-configuration istanbuljs/babel-plugin-istanbul#116 (comment) |
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?
Using babel-plugin-lodash, collectCoverage enabled and a lodash function as show below imported from test file, results into an error.
example#testFunction1
npm test
will outputexample#testFunction2
npm test
will outputRemoving
collectCoverage
frompackage.json
lets the tests run without failure.Removing babel-plugin-lodash from .babelrc or importing directly from lodash also runs without failure.
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
.https://github.com/namjul/jest-babel-lodash-issue
What is the expected behavior?
Test should run without errors.
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
Ubuntu 16.04.1 LTS, node v6.11.0 npm 3.10.10 also tested with node v8.1.3 npm 5.0.3
previous issue: lodash/babel-plugin-lodash#179
The text was updated successfully, but these errors were encountered: