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

Coverage is not displayed properly #975

Closed
repinvv opened this issue Jan 21, 2019 · 7 comments
Closed

Coverage is not displayed properly #975

repinvv opened this issue Jan 21, 2019 · 7 comments

Comments

@repinvv
Copy link

repinvv commented Jan 21, 2019

Version of the library: + nyc@13.1.0

Repository url: https://gitlab.com/vlr/tslib-seed/-/jobs/148945040

There is a gitlab CI configured where the defect reproduces

Expected Behavior

coverage displayed at the end of test run

Observed Behavior

Branch coverage is displayed as 100%, The rest of metrics are displayed as 0%

Operating System: Win7, Win10, Ubuntu on windows, Debian.
Issue does not seem related to OS
Environment Information:
nodev

Issue seem to be related to when nyc package was installed. In our workplace environment, on the same OS, same node and npm versions it did work for one developer who installed it few months ago and did not work for developer who installed it recently.
Also on my home pc it was working, but when i removed and reinstalled global nyc package of the same version, it did break. And i still have nyc of the same version installed a while ago on Ubuntu on windows.
Here is the situation i have on my pc now - the same repository, same packages, it works in bash and does not work in cmd. Deleting node_modules and package lock and running npm i on either system does not change it.
nyc

Can't be sure, but symptoms are as if one of nyc dependencies was recently updated which broken the scenario.

@carlnordenfelt
Copy link

Same issue? #973

@coreyfarrell
Copy link
Member

Appears so. node.js 11.7.0 cannot currently run mocha under nyc. My understanding is this will be fixed by both node.js 11.8.0 and the next release of mocha. Nothing can be done from the nyc side.

@repinvv
Copy link
Author

repinvv commented Jan 24, 2019

Could be the same issue, but output does not look the same, in that other issue no files are listed. In my case all js files are listed with zero coverage.
And issue reproduces with node 10, as you can see in the screenshot.

@coreyfarrell coreyfarrell reopened this Jan 24, 2019
@coreyfarrell
Copy link
Member

Thanks I didn't catch that, reopened.

@bcoe
Copy link
Member

bcoe commented Jan 26, 2019

EDIT: just read that this reproduces in 10.

@repinvv
Copy link
Author

repinvv commented Jan 29, 2019

Do not know what changed, but defect does not seem to reproduce anymore in that gitlab ci environment. NYC version is the same, 13.1.0

@coreyfarrell
Copy link
Member

@repinvv potentially a dependency or node.js has been updated? Difficult to say but I'm going to close this issue since you say it's no longer happening. If it resurfaces please let us know.

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

No branches or pull requests

4 participants