reporter-file
Similar to the xunit-file reporter. Allows you to specify any report style to run, but will also write to the specified xunit file
Last updated 5 years ago by apipkin .
WTFPL · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install reporter-file 
SYNC missed versions from official npm registry.

reporter-file

Similar to the xunit-file reporter. Allows you to specify any report style to run, but will also write to the specified file

How to use

  1. Add "reporter-file" to your package.json devDependencies
  2. Run mocha with either -R reporter-file or --reporter reporter-file

Specifying the Reporter

The reporter can be specified in the MOCHA_REPORTER environment variable or the config.json file. If neither of these are provided, it will defaul to XUnit

MOCHA_REPORTER=Spec

Default Mocha Reporter Options

Mocha comes with several reporters that can be used:

  • Dot
  • Doc
  • TAP
  • JSON
  • HTML
  • List
  • Min
  • Spec
  • Nyan
  • XUnit
  • Markdown
  • Progress
  • Landing
  • JSONCov
  • HTMLCov
  • JSONStream

Specifying the Output

The output file is saved to the file given in the MOCHA_REPORTER_FILE environment variable, the file named in config.json, or process.cwd()/xunit.xml

MOCHA_REPORTER_FILE=output/xunit.xml mocha -R xunit-file

Credits

The original idea and basis for the output file structure came from xunit-file

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

3 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           5 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |