Socket
Socket
Sign inDemoInstall

karma-threshold-reporter

Package Overview
Dependencies
165
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-threshold-reporter

A Karma plugin. Fail tests if the coverage falls below the given threshold.


Version published
Maintainers
1
Weekly downloads
3,632
increased by35.57%
Install size
7.93 MB

Weekly downloads

Readme

Source

karma-threshold-reporter

Fail the build if the coverage falls below a pre configured value

Installation

The easiest way is to keep karma-threshold-reporter as a devDependency in your package.json.

{
  "devDependencies": {
    "karma": "~0.10",
    "karma-threshold-reporter": "~0.1.7"
  }
}

You can simple do it by:

npm install karma-threshold-reporter --save-dev

NPM Stats

Configuration

// karma.conf.js or karma-e2e.conf.js
module.exports = function(config) {
  config.set({
  
    plugins: ['karma-threshold-reporter'],
  
    reporters: ['progress', 'coverage','threshold'],

    // the configure thresholds
    thresholdReporter: {
      statements: 90,
      branches: 60,
      functions: 85,
      lines: 90
    }
  });
};

You can pass list of reporters as a CLI argument too:

karma start --reporters coverage,threshold

For more information on Karma see the homepage.

Keywords

FAQs

Last updated on 05 Feb 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc