sxf

spec-xunit-file

Mocha reporter which displays Spec output and generates xunit XML file

Showing:

Popularity

Downloads/wk

17.1K

GitHub Stars

5

Maintenance

Last Commit

7yrs ago

Contributors

3

Package

Dependencies

0

Size (min+gzip)

1.0KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

spec-xunit-file

Mocha test reporter. Displays 'spec' reporter output to stdout and generates a xunit XML file in background.

Based upon xunit-file reporter

How to use

  1. Install spec-xunit-file
> npm install --save-dev spec-xunit-file
  1. If using mocha cli with use the -R or --reporter option
> mocha -R spec-xunit-file

or

> mocha --reporter spec-xunit-file

Options

The xunit output file is saved by default in a file called xunit.xml in the current directory i.e. process.cwd()/xunit.xml

To override this file or location use the XUNIT_FILE environment varrible

> XUNIT_FILE=output/xunit.xml mocha -R xunit-file

Set LOG_XUNIT environment variable, if you want the output in the console and xml file.

> LOG_XUNIT=true mocha -R xunit-file

Credits

This reporter is based on xunit-file which in-turn based on the original xunit reporter from mocha only writing the result in an xml file.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100