-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
Question: can you check coverage on a per-file basis? #468
Comments
use
|
Thank @alonronin. That strikes me as the checking being a manual process - is there a way of using the |
@riggerthegeek @alonronin this sounds like a reasonable feature request, any thoughts about what the interface might look like for enabling this? |
To my mind, a simple boolean in the config object. I'd suggest If I were writing the package from scratch, I'd default it to If everyone's ok with that update, I'll have a look at doing a PR |
maybe |
Sounds good to me @alonronin. When I get some time over the next month, I'll see if I can create a pull request |
This sounds like a definite value add, though I'd definitely favour |
I suggest to have lines, statements, functions & branches under a global object and also a perFile object. Something similar of https://github.com/titel-media/karma-istanbul-threshold for global and each |
Ya. Would love this feature to have both. Currently migrating some repos over from istanbul and noticed it missing. |
Is there a plan to support per-file coverage thresholds with possible overrides? |
I think jest provides a neat feature to allow for individual files thresholds, does not look like a complicated effort although i have not looked deeply into the checkCoverage code, jest's impl seems reasonably simple, any chance we can get something along those lines? |
I didn't really want to put a question in here, but I can't find it detailed elsewhere.
I'm trying to set up my coverage tests to ensure that each file has at least 80% coverage on lines, statements, functions and branches. The calculations with my config appear to be working on the coverage of the whole project., not on the individual files.
As an example, if the coverage of the whole project is 90%, but one file only has 70% coverage, I want NYC to throw a
check-coverage
error.Does anyone have any bright ideas?
My
package.json
:The text was updated successfully, but these errors were encountered: