Socket
Socket
Sign inDemoInstall

xunit-file

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xunit-file - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc