Skip to content
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

Nyc doesn't include files that has spread object syntax on the coverage #657

Closed
erickzanardo opened this issue Aug 28, 2017 · 4 comments · Fixed by istanbuljs/istanbuljs#82

Comments

@erickzanardo
Copy link

Expected Behavior

All files, that aren't excluded on nyc config should be included on the coverage

Observed Behavior

Files that have the spread operator syntax are been omitted from the coverage

I've included a zip file that contains a simple npm project that reproduces the problem, basically the project has two files a.js and b.js:

// a.js
module.exports = a => ({ ...a })
// b.js
module.exports = b => Object.assign({}, b)

They both are tested but when the cover is executed, the file a.js is not listed on the cover report.

I'm using node 8.4, which supports the object spread syntax

nyc-spread-error.zip

@bcoe
Copy link
Member

bcoe commented Sep 5, 2017

@erickzanardo this should now be fixed in [email protected] mind trying it out?

@beckend
Copy link

beckend commented Sep 5, 2017

@bcoe works!

@erickzanardo
Copy link
Author

@bcoe it worked, thanks a lot

@XVincentX
Copy link

Guys I'm still facing the same issue on Node 6

This is the broken build
https://circleci.com/gh/ExpressGateway/express-gateway/2343
I had to workaround it with this commit: 9c84d0f
It is working correctly on Node 8, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants