xunit-file
Advanced tools
Comparing version 0.0.7 to 0.0.8
{ | ||
"name": "xunit-file", | ||
"description": "Basically the same reporter as mocha's xunit reporter, but writes the output in a file.", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Matthias Jahn", |
@@ -6,21 +6,42 @@ xunit-file | ||
# How to use | ||
![](https://img.shields.io/npm/v/xunit-file.svg) | ||
![](https://img.shields.io/npm/dm/xunit-file.svg) | ||
1. Add "xunit-file" to your package.json as a developmentDependency | ||
2. Run mocha with `-R xunit-file` or `--reporter xunit-file` | ||
# Usage | ||
The xunit output file is saved to the file given in the XUNIT_FILE environment variable, the file named in config.json, or process.cwd()/xunit.xml | ||
``` | ||
npm install xunit-file --save-dev | ||
``` | ||
> XUNIT_FILE=output/xunit.xml mocha -R xunit-file | ||
Run mocha with `-R xunit-file` or `--reporter xunit-file` | ||
Set LOG_XUNIT environment variable, if you want the output in the console and xml file. | ||
The xunit.xml output is saved in `process.cwd()/xunit.xml` by default. | ||
> LOG_XUNIT=true mocha -R xunit-file | ||
### Options | ||
To change the output and activate terminal output, you can create a `config.json`, or use environment variables. | ||
**config.json** | ||
``` | ||
{ | ||
"file" : "xunit.xml", | ||
"consoleOutput" : { | ||
"suite" : true, | ||
"test" : true, | ||
"fail" : false | ||
} | ||
} | ||
``` | ||
**environment variables** | ||
``` | ||
$ XUNIT_FILE=output/xunit.xml mocha -R xunit-file // writes result to output/xunit.xml | ||
$ LOG_XUNIT=true mocha -R xunit-file // activates terminal output | ||
``` | ||
# Credits | ||
This reporter is just the original [xunit reporter](https://github.com/visionmedia/mocha/blob/master/lib/reporters/xunit.js) from mocha only writing the result in an xml file. | ||
# LICENSE | ||
# LICENSE | ||
MIT |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47
8046
10