I am currently using Karma's coverage within a project, I would like to enforce a threshold for the coverage to be set at and therefore make my builds on Circle CI to fail and go red due to it being lower than a set percentage.
Asked
Active
Viewed 3,281 times
7
-
You should really accept the answer you've got at the moment. Thanks. – alecxe Nov 17 '14 at 01:25
-
yeah apologise I hadn't seen the answer – Nick White Nov 17 '14 at 16:34
1 Answers
7
You can install karma-threshold-reporter
and configure it as shown in the README.

Svante
- 50,694
- 11
- 78
- 122
-
A short eight and a half years later , the [repo](https://github.com/lithiumtech/karma-threshold-reporter) and [site](https://github.com/lithiumtech/karma-threshold-reporter) are kaput. Any other good options? ([This](https://github.com/karma-runner/karma-coverage/blob/master/docs/configuration.md#check) might be useful.) – ruffin May 26 '23 at 17:40
-
https://github.com/karma-runner/karma-coverage/blob/master/docs/configuration.md#check was posted three years ago, but deleted because it was only a link -_-. I guess it's a problem of the question, but nevertheless I don't see better ways to ask or answer, and since web search is increasingly broken nowadays (enshittification) … – Svante Jun 05 '23 at 11:38