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

support for per-each file coverage check #611

Closed
ciekawy opened this issue Jun 15, 2017 · 6 comments
Closed

support for per-each file coverage check #611

ciekawy opened this issue Jun 15, 2017 · 6 comments

Comments

@ciekawy
Copy link

ciekawy commented Jun 15, 2017

Please use the template provided below, when reporting bugs:

Expected Behavior

support to provide and require thresholds per-each file like in
gotwarlost/istanbul#30

Observed Behavior

not possible to define per-each file coverage checks

Bonus Points! Code (or Repository) that Reproduces Issue

Forensic Information

I believe this is just not supported yet so skipping following sections, can add this info anytime

Operating System: the operating system you observed the issue on.
Environment Information: information about your project's environment, see instructions below:

  1. run the following script:

sh -c 'node --version; npm --version; npm ls' > output.txt

  1. share a gist with the contents of output.txt.
@ciekawy
Copy link
Author

ciekawy commented Jun 15, 2017

seems like this can be relatively simple to implement by enhancing NYC::checkCoverage

nyc/index.js

Line 444 in 213206f

NYC.prototype.checkCoverage = function (thresholds) {

@JaKXz
Copy link
Member

JaKXz commented Jun 15, 2017

I think this is addressed in #591. Feel free to test it out by installing:

npm cache clear; npm install 1and1/nyc#coverage_per_file

@ciekawy
Copy link
Author

ciekawy commented Jun 20, 2017

Looks like exactly what I was looking for. Thanks @JaKXz for pointing this out!

@bcoe
Copy link
Member

bcoe commented Jul 29, 2017

@ciekawy this feature is now landed 👍

@bcoe bcoe closed this as completed Jul 29, 2017
@mkonikov
Copy link

Is there a way to do it both per file and globally like it was done previously in Istanbul?
https://github.com/gotwarlost/istanbul/blob/master/test/cli/sample-project/config-check-mixed.istanbul.yml

Can this be set in an .nycrc file?

@mkonikov
Copy link

I see this was outlined here - #468 - but doesn't seem possible yet.

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