jest-mocha-reporter
A reporter for jest which produces a report compatible with Atlassian Bamboo Mocha Test Parser.This is compatible with both reporter and testResultsProcessor
See Reporters
See testResultsProcessor
Forked From
- Forked from jest-bamboo-reporter
- Forked from [jest-bamboo-formatter](https://github.com/adalbertoteixeira/jest-bamboo-formatter)
Installation
Usage
In the jest config file add the path to the module.If you are using testResultsProcessor:
"testResultsProcessor": "jest-mocha-reporter"
}
If you are using Reporters:
"reporter": "jest-mocha-reporter"
}
See Configuring Jest.
Configuration
The name of test suite and separator can be customized by setting the environment variablesJEST_MOCHA_SUITE_NAME
supports following variables- firstAncestorTitle: The name of the outermost "describe" group
- filePath: Full path of the test
- fileName: File name of the test
- fileNameWithoutExtension: File name of the test without extension
Also, variable supports fallback. For example:
{firstAncestorTitle|filename}
means use file name of the test if it doesn't have a group name.Output
By default, the reporter writes totest-report.json
. The file name can be changed by setting the JEST_REPORT_FILE
environment variable.