-
Notifications
You must be signed in to change notification settings - Fork 248
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
feat(reporter): add check coverage thresholds #141
feat(reporter): add check coverage thresholds #141
Conversation
coverageReporter: { | ||
check: { | ||
global: { | ||
statements: 50, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this threshold? Red to Yellow, or Yellow or Green?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check thresholds are separate from the watermark thesholds, so the colors have no impact on whether the check will pass or fail.
The Istanbul tool also keeps them separate.
Please review and merge this. Thanks. Let me know if there is any additional information I can provide. |
What is the process for getting this reviewed? |
@nmalaguti From my experience, waiting or pestering them until they do it. I had a PR that sat out here for months. |
@nmalaguti , @stramel sorry guys. I really should spend some time to review because I dont use coverage(karma-coverage) and It's hard understand on the fly what this code do Thanks! |
Let me know if there's anything I can do to add some context to the change. |
Following up on this. |
@maksimr I wanted to follow up on this and see if we can get this merged in and released. |
@nmalaguti Way to be persistent 👍 |
I haven't gotten to karma-coverage yet, but will try to get to it this week, if @maksimr doesn't get to it first |
@dignifiedquire @maksimr any chance this can be merged this week? |
@dignifiedquire @maksimr following up on this PR. |
/* | ||
Copyright (c) 2012, Yahoo! Inc. All rights reserved. | ||
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you adding these license blocks?
The code to calculate coverage was sourced from https://github.com/gotwarlost/istanbul/blob/master/lib/command/check-coverage.js and modified to work in karma. I'm giving proper attribution to the code. |
I'm all for giving attribution, but it's not really helpful to have these multiple license blocks, with references to a license file that doesn't even exist in this code base. I suggest you add a header to the file saying something like // Part of this code is based on [1], which is licensed under the new BSD license
// For more information see the license accompanying [1]
//
// [1]: https://github.com/gotwarlost/istanbul/blob/master/lib/command/check-coverage.js |
Also need another rebase after I merged some PRs |
69ad95f
to
cec8da7
Compare
Rebased. I added the BSD license to the LICENSE file so that it will be distributed with the code. I also added the suggested comment to the top. |
Please put the license in a different file, something like |
That change and one more rebase and I can push it out for a new release :) |
Add check option to coverageReporter options. Supports similar options to istanbul's check-coverage feature. It will cause karma to return a non-zero exit code if coverage thresholds are not met. Closes karma-runner#21
cec8da7
to
bc63b15
Compare
Rebased and moved LICENSE. |
feat(reporter): add check coverage thresholds
Thanks for all the work! |
Add check option to coverageReporter options. Supports similar
options to istanbul's check-coverage feature.
It will cause karma to return a non-zero exit code if coverage
thresholds are not met.
Closes #21