All Projects → mattlewis92 → Karma Coverage Istanbul Reporter

mattlewis92 / Karma Coverage Istanbul Reporter

Licence: mit
A karma reporter that uses the latest istanbul 1.x APIs to report coverage

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Karma Coverage Istanbul Reporter

coverex
Coverage Reports for Elixir
Stars: ✭ 98 (-36.36%)
Mutual labels:  coverage-report
Xcov
Nice code coverage reporting without hassle
Stars: ✭ 467 (+203.25%)
Mutual labels:  coverage-report
Unittesting
Testing Sublime Text Packages
Stars: ✭ 95 (-38.31%)
Mutual labels:  coverage-report
mutant-swarm
Mutation testing framework and code coverage for Hive SQL
Stars: ✭ 20 (-87.01%)
Mutual labels:  coverage-report
Jslint
JSLint, The JavaScript Code Quality and Coverage Tool
Stars: ✭ 3,479 (+2159.09%)
Mutual labels:  coverage-report
Gogradle
A Gradle Plugin Providing Full Support for Go
Stars: ✭ 712 (+362.34%)
Mutual labels:  coverage-report
behat-code-coverage
Generate Code Coverage reports for Behat tests
Stars: ✭ 48 (-68.83%)
Mutual labels:  coverage-report
Typescript Coverage Report
Node command tool to generate TypeScript coverage report
Stars: ✭ 138 (-10.39%)
Mutual labels:  coverage-report
Simplecov
Code coverage for Ruby with a powerful configuration library and automatic merging of coverage across test suites
Stars: ✭ 4,362 (+2732.47%)
Mutual labels:  coverage-report
Clang Blueprint
🏰 Example C++11 CMake project that incorporates awesome Clang tooling 🐉
Stars: ✭ 63 (-59.09%)
Mutual labels:  coverage-report
LocalCoverage.jl
Trivial functions for working with coverage for packages locally.
Stars: ✭ 55 (-64.29%)
Mutual labels:  coverage-report
Covr
Test coverage reports for R
Stars: ✭ 285 (+85.06%)
Mutual labels:  coverage-report
Tarpaulin
A code coverage tool for Rust projects
Stars: ✭ 1,097 (+612.34%)
Mutual labels:  coverage-report
hpc-coveralls
coveralls.io support for haskell code coverage with hpc
Stars: ✭ 60 (-61.04%)
Mutual labels:  coverage-report
Codacy Coverage Reporter
Multi-language coverage reporter for Codacy
Stars: ✭ 96 (-37.66%)
Mutual labels:  coverage-report
goverreport
Command line tool for coverage reporting and validation
Stars: ✭ 44 (-71.43%)
Mutual labels:  coverage-report
Gcovr
generate code coverage reports with gcc/gcov
Stars: ✭ 482 (+212.99%)
Mutual labels:  coverage-report
Coverband
Ruby production code coverage collection and reporting (line of code usage)
Stars: ✭ 1,937 (+1157.79%)
Mutual labels:  coverage-report
Bashcov
Code coverage tool for Bash
Stars: ✭ 113 (-26.62%)
Mutual labels:  coverage-report
Phpspec Code Coverage
Generate Code Coverage reports for PhpSpec tests
Stars: ✭ 59 (-61.69%)
Mutual labels:  coverage-report

karma-coverage-istanbul-reporter

Sponsorship Build Status codecov npm version npm Twitter Follow

A karma reporter that uses the latest istanbul 1.x APIs (with full sourcemap support) to report coverage.

About

This is a reporter only and does not perform the actual instrumentation of your code. Babel users should use the istanbul babel plugin to instrument your code and webpack + typescript users should use the coverage-istanbul-loader and then use this karma reporter to do the actual reporting. See the test config for an e2e example of how to combine them.

Installation

npm install karma-coverage-istanbul-reporter --save-dev

Configuration

// karma.conf.js
const path = require('path');

module.exports = function(config) {
  config.set({
    // ... rest of karma config

    // anything named karma-* is normally auto included so you probably dont need this
    plugins: ['karma-coverage-istanbul-reporter'],

    reporters: ['coverage-istanbul'],

    coverageIstanbulReporter: {
      // reports can be any that are listed here: https://github.com/istanbuljs/istanbuljs/tree/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib
      reports: ['html', 'lcovonly', 'text-summary'],

      // base output directory. If you include %browser% in the path it will be replaced with the karma browser name
      dir: path.join(__dirname, 'coverage'),

      // Combines coverage information from multiple browsers into one report rather than outputting a report
      // for each browser.
      combineBrowserReports: true,

      // if using webpack and pre-loaders, work around webpack breaking the source path
      fixWebpackSourcePaths: true,

      // Omit files with no statements, no functions and no branches covered from the report
      skipFilesWithNoCoverage: true,

      // Most reporters accept additional config options. You can pass these through the `report-config` option
      'report-config': {
        // all options available at: https://github.com/istanbuljs/istanbuljs/blob/73c25ce79f91010d1ff073aa6ff3fd01114f90db/packages/istanbul-reports/lib/html/index.js#L257-L261
        html: {
          // outputs the report in ./coverage/html
          subdir: 'html'
        }
      },

      // enforce percentage thresholds
      // anything under these percentages will cause karma to fail with an exit code of 1 if not running in watch mode
      thresholds: {
        emitWarning: false, // set to `true` to not fail the test command when thresholds are not met
        // thresholds for all files
        global: {
          statements: 100,
          lines: 100,
          branches: 100,
          functions: 100
        },
        // thresholds per file
        each: {
          statements: 100,
          lines: 100,
          branches: 100,
          functions: 100,
          overrides: {
            'baz/component/**/*.js': {
              statements: 98
            }
          }
        }
      },

      verbose: true // output config used by istanbul for debugging
    }
  });
};

List of reporters and options

Credits

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].