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 does not check coverage from given file #783

Closed
aalexgabi opened this issue Feb 21, 2018 · 3 comments · Fixed by #1101
Closed

nyc does not check coverage from given file #783

aalexgabi opened this issue Feb 21, 2018 · 3 comments · Fixed by #1101

Comments

@aalexgabi
Copy link

Expected Behavior

nyc check-coverage --statements 90 test/coverage/coverage-final.json

Should check coverage compared to test/coverage/coverage-final.json

Observed Behavior

It checks coverage compared to .nyc_output folder

Because I use async class methods I can't use istanbul but when I need to check coverage I have to use istanbul check-coverage due to limitations of nyc check-coverage:

istanbul check-coverage --statements 90 test/coverage/coverage-final.json

Forensic Information

Operating System: Manjaro

node v8.9.2
npm 5.5.1
@stale stale bot added the wontfix label Jan 6, 2019
@JaKXz
Copy link
Member

JaKXz commented Jan 24, 2019

Hi @aalexgabi sorry for the late reply - I think if you specify --temp-dir test/coverage/ with the appropriate .json files in that folder this should work! Let me know if not.

@istanbuljs istanbuljs deleted a comment from stale bot Jan 24, 2019
@JaKXz JaKXz added question and removed wontfix labels Jan 24, 2019
@coreyfarrell
Copy link
Member

That is correct, --temp-dir test/coverage will work. An issue that remains is nyc check-coverage --help does not list this as a valid flag, so I think this is a documentation issue.

@stale stale bot added the stale label May 6, 2019
@istanbuljs istanbuljs deleted a comment from stale bot May 6, 2019
@stale stale bot removed the stale label May 6, 2019
@JaKXz
Copy link
Member

JaKXz commented May 6, 2019

EDIT: Never mind! This actually is not documented atm by npx nyc check-coverage --help.

@coreyfarrell I think we can just close this issue since the question has been answered and the --temp-dir option is documented by npx nyc check-coverage --help. There's also a FAQ link on the https://istanbul.js.org website that links to all question-issues whether they're open or closed :)`

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.

3 participants