Skip to content

jonhermansen/polyglot-xunit-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

polyglot-xunit-file

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

Based upon spec-xunit-file reporter

How to use

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

or

> mocha --reporter polyglot-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 spec-xunit-file which in-turn based on xunit-file which in-turn based on the original xunit reporter from mocha only writing the result in an xml file.

About

Mocha reporter which can display TAP or Spec output and generate an xunit XML file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •