-
Notifications
You must be signed in to change notification settings - Fork 76
Installation and Usage
npm install jest-html-reporter --save-dev
Configure Jest to process the test results by adding the following entry to the Jest config (jest.config.json):
"reporters": [
"default",
["./node_modules/jest-html-reporter", {
"pageTitle": "Test Report"
}]
]
As you run Jest from within the terminal, a file called test-report.html will be created within your root folder containing information about your tests.
There are multiple configuration options available. To read more about these, please refer to the configuration section.
To run the reporter as a test results processor (after Jest is complete instead of running in parallel), add the following entry to the Jest config (jest.config.json):
{
"testResultsProcessor": "./node_modules/jest-html-reporter"
}
Note: When running as a testResultsProcessor, the configuration needs be placed within a new file named jesthtmlreporter.config.json
residing in the root folder.
More information about this can be found in the configuration section.
This plugin is compatible with Node version ^4.8.3