Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

mocha-community/multi-reporter

Repository files navigation

npm version JavaScript Style Guide

@mochajs/multi-reporter

Multiple reporter for Mocha

Installation

$ npm i -D @mochajs/multi-reporter

Usage

Use --reporter in your test command.

{
  "scripts": {
    "test": "mocha --reporter @mochajs/multi-reporter"
  }
}

Or, add reporter to your configuration file.

{
  "reporter": "@mochajs/multi-reporter"
}

Create .reporters.json file.

{
  "spec": true,
  "xunit": {
    "output": "report.xml"
  }
}

Options

config

By default, it will use .reporters.json as config file. To use other file, use --reporter-options in your test command.

{
  "scripts": {
    "test": "mocha --reporter @mochajs/multi-reporter --reporter-options config=filename.json"
  }
}

Or, add reporter-option to your configuration file.

{
  "reporter": "@mochajs/multi-reporter",
  "reporter-option": [
    "config=filename.json"
  ]
}

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •