1.2.0 • Published 6 years ago

testem-multi-reporter v1.2.0

Weekly downloads
3,683
License
MIT
Repository
github
Last release
6 years ago

Testem Multi Reporter

Helpful in running multiple reporters for the same test run. For example, in CI, you can output a failure only, dot, or time reporter to the console, and an xunit report to a file.

Installation

npm install --save-dev testem-multi-reporter

Usage

Create a testem.js config file that sets reporter to testem-multi-reporter, and pass it the other reporters you want to use.

const MultiReporter = require('testem-multi-reporter');
const TimeReporter = require('testem-time-reporter');
const XunitReporter = require('testem/lib/reporters/xunit_reporter');

const reporters = [{
  ReporterClass: TimeReporter,
  args: [{ out: process.stdout }]
}, {
  ReporterClass: XunitReporter,
  args: [false, 'tests/xunit.xml', { get: () => false }]
}];
const multiReporter = new MultiReporter({ reporters });

module.exports = {
  framework: 'qunit',
  test_page: 'tests/index.html?hidepassed&coverage',
  disable_watching: true,
  launch_in_ci: [
    'PhantomJS'
  ],
  reporter: multiReporter
};

Run tests in an Ember CLI project, reporting only failures:

ember test --config-file ~/work/project/testem.js

Notes

This currently doesn't work with ember test --module some-module because Ember CLI rewrites the testem.json file to accomplish this, and doesn't support the testem.js file.

See Ember CLI config rewriting and testem.js parsing.

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago