-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
yarn and coverage with Istanbul #6746
Comments
Watching.. |
By downgrading to an older version of yarn, we can avoid this bug yarnpkg/yarn#6746 Until that issue is resolved, we'll use v1.9 of yarn
Confirmed, downgraded to 10.9 and fixed this issue |
By downgrading to an older version of yarn, we can avoid this bug yarnpkg/yarn#6746 Until that issue is resolved, we'll use v10.9 of yarn
By downgrading to an older version of yarn, we can avoid this bug yarnpkg/yarn#6746 Until that issue is resolved, we'll use v1.9 of yarn
Can confirm this is the case with Node 11.4.0 and yarn 1.12.3, nyc 13.1.0. Switched back to npm, and coverage report returned to expected output. |
Will be fixed in the next release, by the end of the week (fixed in #6747) |
Great, thanks. |
Btw, I tested 1.13.0 pre-release with nyc, and it works now! |
Alright, upon upgrading the real yarn on my machine, it doesn't work. Since I had 2 yarns running, I hardcoded the path in the package.json, like so:
And it worked, but not for the reason I though. If I don't hardcode the path to yarn, even with 1.13.0, it doesn't report coverage with nyc. If I make nyc run
This
Which looks like the same problem that was linked by @jeremad. I just accidentally bypassed it by hardcoding the path to yarn. |
This pins the version of node to 11.6.0 and yarn 1.12.3. node 11.7.0 or yarn 1.13.0 causes nyc to report 0% coverage. istanbuljs/nyc#921 yarnpkg/yarn#6746 circleci/node:11.6.0 Digest: sha256:1a3a10a092bdfa3d92d48850818a5526b5770a58592156f6f8e6a5f7d946ac43 Created 2019-01-18T00:14:29.784667795Z NODE_VERSION=11.6.0 YARN_VERSION=1.12.3
I'm still getting I'm using Is there another idea for a fix? Has anyone found a good work-around? The absolute path to yarn work-around might not work in my case due to this library being run by different developers on different environments where |
@sjl2 It looks like it has something to do with the new node version, it works in 11.6 and not in 11.7. -> istanbuljs/nyc#921 (comment) Haven't looked into it myself yet, I'll see if I can make it work. |
Interesting. Well, I can confirm it's also occurring on |
Confirmed issue on node |
I'm seeing the same issue in npm as well FWIW |
same. yarn + nyc not showing coverage :( |
- yarn + istanbul turns out do not work well together: yarnpkg/yarn#6746
Same over here! What's the workaround other than calling |
Add some Node configurations (10 & 12 on both mac & linux) Use a workaround to have a working coverage command yarnpkg/yarn#6746
Add some Node configurations (10 & 12 on both mac & linux) Use a workaround to have a working coverage command yarnpkg/yarn#6746
Add some Node configurations (10 & 12 on both mac & linux) Use a workaround to have a working coverage command yarnpkg/yarn#6746
Add some Node configurations (10 & 12 on both mac & linux) Use a workaround to have a working coverage command yarnpkg/yarn#6746
I have lost hope that yarnpkg/yarn#6746 will ever be fixed
Are there any known workarounds for this issue, besides using npm? |
Same here with yarn 1.19.1, node 12.3.1 and nyc 14.1.1.
|
I've seen what appears to be an incompatibility between The hope is for nyc and related modules to be out of pre-release soon but this is a very complex module so I'm being cautious. |
@coreyfarrell it works with |
Was banging my head against the wall with this in Yarn |
fixed with nyc 15.0.0 |
Using nyc (aka istanbul) and yarn with a version newer than 1.10.1 does not give me the coverage result.
package.json:
With yarn:
using nyc directly:
using npm (or changing package.json to use npm test instead of yarn test)
I use nodejs 10.14 and ubuntu 18.04.
This looks like:
#6650
#6678
#6608
The text was updated successfully, but these errors were encountered: