1.0.2 • Published 6 years ago

karma-istanbul-cobertura-badger-reporter v1.0.2

Weekly downloads
50
License
MIT
Repository
github
Last release
6 years ago

Allows you to autogenerate coverage badges using cobertura reports

How to install

npm install --save-dev karma-istanbul-cobertura-badger-reporter

Get Started

karma-istanbul-cobertura-badger-reporter works perfectly with karma-coverage-istanbul-reporter.

You should simply update your karma configuration a bit:

module.exports = (config) => {
  config.set({
      ...
      reporters: ['coverage-istanbul', 'cobertura-badger'],
      coverageIstanbulReporter: {
        ...
-       reports: ['lcov'],
+       reports: ['lcov', 'cobertura'],
        ...
      },
+      istanbulCoberturaBadger: {
+        badgeFileName: 'coverage', // => coverage.svg
+        destinationDir: './',
+        istanbulReportFile: "./coverage/cobertura-coverage.xml", // path to cobertura xml report 
+      }
      ...
    });
};

You're are also able to pass any other options from istanbul-cobertura-badger. More info here: https://github.com/intuit/istanbul-cobertura-badger#examples

Contributing

Contributions are always welcome. Before contributing please read the code of conduct & search the issue tracker (your issue may have already been discussed or fixed).

To contribute, follow next steps:

  • Fork karma-istanbul-cobertura-badger-reporter
  • Commit your changes
  • Open a Pull Request.

Feature Requests

Feature requests should be submitted in the issue tracker, with a description of the expected behavior & use case, where they'll remain closed until sufficient interest (e.g. :+1: reactions). Before submitting a feature request, please search for similar ones in the closed issues.

License

Released under the MIT License