-
-
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
Object spread error when collecting coverage with configured transform
#5082
Object spread error when collecting coverage with configured transform
#5082
Comments
Fix upstream: istanbuljs/babel-plugin-istanbul#141 If that is rejected, we can add the plugin on our side in here: https://github.com/facebook/jest/blob/df9234006a9c8592ede2539b0fb0832852272c77/packages/jest-runtime/src/script_transformer.js#L170-L180 |
Same issue here, hope this will be released soon :) |
"resolutions": {
"babel-plugin-istanbul": "SimenB/babel-plugin-istanbul#f467aee1e356f173ceb07f549894c597fae66311"
} Wait no, sorry. They transpile, so installing from github won't work. You can publish my fork though, then you can use |
Thanks but we're using npm. |
Same issue:
Node version is v8.9.1
Without collectCoverage tests are green.
|
Since this has been fixed upstream you can now use this with yarn in package.json:
|
Oh, good point. |
i am not sure what we are suppose to do i am using jest 24.9.0 and i still have the error |
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?
Tests fail to run and give the following error:
If the current behavior is a bug, please provide the steps to reproduce through a minimal
repository on GitHub that we can
yarn install
andyarn test
.Please see this demo repo: https://github.com/nwoltman/jest-object-spread-bug
What is the expected behavior?
Tests pass with 100% code coverage.
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
Jest 21.2.1
Node 8.9.1 (which supports object spread syntax)
OS: Windows 10, Ubuntu 17.10
jest.config.js
The error only occurs while collecting coverage.
The error does not occur if
transform
is not set.Related to issue #4248 which was partially fixed by PR #4519.
This issue is also sort of like reopening #5070 since you shouldn't have to use your own transformer to transform object spread syntax if it is natively supported by Node (especially since tests work just fine when not collecting coverage).
The text was updated successfully, but these errors were encountered: