1.4.0 • Published 3 years ago
@es-joy/json-file-reporter v1.4.0
@es-joy/json-file-reporter
JSON file reporter for Mocha
A fork of @mochajs/json-file-reporter.
Installation
$ npm i -D @es-joy/json-file-reporterUsage
Use --reporter in your test command.
{
"scripts": {
"test": "mocha --reporter @es-joy/json-file-reporter"
}
}Or, add reporter to your configuration file.
{
"reporter": "@es-joy/json-file-reporter"
}Options
output
By default, it will output to report.json. To write to other file, use --reporter-options in your test command.
{
"scripts": {
"test": "mocha --reporter @es-joy/json-file-reporter --reporter-options output=filename.json"
}
}Or, add reporter-option to your configuration file.
{
"reporter": "@es-joy/json-file-reporter",
"reporter-option": [
"output=filename.json"
]
}