A karma plugin to report Karma test results as a subunit stream
Go to file
Tim Buckley 45c359feea Update package.json
This updates 'package.json' to prepare for openstack project import.
The 'node-subunit' dependency has been changed to 'subunit-js' to
account for the project rename, dependency layout is reorganized,
and npm scripts are updated to work with CI system.
2016-06-09 12:13:27 -06:00
.eslintignore Initial import 2016-05-27 16:21:33 -06:00
.eslintrc.json Initial import 2016-05-27 16:21:33 -06:00
.gitignore Add README and other administrative bits 2016-05-27 16:34:01 -06:00
.tern-project Initial import 2016-05-27 16:21:33 -06:00
LICENSE Add README and other administrative bits 2016-05-27 16:34:01 -06:00
README.md Add README and other administrative bits 2016-05-27 16:34:01 -06:00
index.js Support custom testId normalization functions 2016-06-09 12:01:34 -06:00
package.json Update package.json 2016-06-09 12:13:27 -06:00

README.md

karma-subunit-reporter

Writes Karma results to Subunit streams compatible with Subunit consumers like stackviz and subunit2sql.

Installation

npm install --save-dev karma-subunit-reporter

Usage

Trivial usage only requires that you install the plugin and then add it as a reporter in your karma.conf.js:

module.exports = function(config) {
  config.set({
    // ...

    reporters: ['some', 'other', 'reporters', 'subunit'], // <----

    // ...
  });    
};

You can also specify some configuration parameters with the subunitReporter object (defaults are shown below):

module.exports = function(config) {
  config.set({
    reporters: ['subunit'],

    // ...

    subunitReporter: {
      outputFile: 'karma.subunit',
      tags: [],      // tag strings to append to all tests
      slug: false,   // convert whitespace to '_'
      separator: '.' // separator for suite components + test name
    }
  });    
};