A JUnit test reporter for Jest.
Switch branches/tags
Nothing to show
Clone or download
Kledal and michaelleeallen Update README.md (#7)
Add missing " in the CI command.
Latest commit 55e5585 Apr 28, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fix fs calls without callback (#13) Apr 27, 2018
.gitignore add IDEs to ignore, refactor imperative code to be declarative Jan 16, 2017
.travis.yml remove before_script, add g++ updates Feb 21, 2017
LICENSE Added a license file Jan 14, 2017
README.md Update README.md (#7) Apr 27, 2018
index.js modify readme and add unit test Mar 22, 2017
package.json 1.1.0 Mar 23, 2017

README.md

jest-junit-reporter

A JUnit test reporter for Jest.

Installation

$ npm i -D jest-junit-reporter

Usage

In your package.json file include a "jest" config section and specify the "testResultsProcessor":

{
  "jest": {
    "testResultsProcessor": "./node_modules/jest-junit-reporter"
  }
}

For your Continuous Integration you can simply do:

jest --ci --testResultsProcessor="./node_modules/jest-junit-reporter"

The reporter will generate a test-report.xml file in the project root. If you need to specify a different location(e.g., for a CI server) then set the environment variable TEST_REPORT_PATH to the desired location. If you need to specify a different file name other than test-report.xml, you can set the environment variable TEST_REPORT_FILENAME to the desired file name.

LICENSE

MIT