Gathering detailed insights and metrics for jest-html-reporter
Gathering detailed insights and metrics for jest-html-reporter
Gathering detailed insights and metrics for jest-html-reporter
Gathering detailed insights and metrics for jest-html-reporter
jest-html-reporters
Jest test results processor for generating a summary in HTML
jest-stare
jest html reporter (results processor) to view HTML jest results, save raw JSON, and invoke multiple reporters
html-reporter
Html-reporter and GUI for viewing and managing results of a tests run. Currently supports Testplane and Hermione.
jest-html-reporter-hyperlink
Jest test results processor for generating a summary in HTML
Jest test results processor for generating a summary in HTML
npm install jest-html-reporter
Typescript
Module System
Min. Node Version
Node Version
NPM Version
78
Supply Chain
27.5
Quality
82.3
Maintenance
100
Vulnerability
97
License
TypeScript (88.44%)
CSS (5.68%)
Shell (3.04%)
JavaScript (1.43%)
Dockerfile (1.42%)
Total Downloads
43,668,687
Last Day
8,431
Last Week
300,416
Last Month
1,210,186
Last Year
12,168,487
MIT License
278 Stars
348 Commits
76 Forks
6 Watchers
3 Branches
16 Contributors
Updated on Mar 26, 2025
Minified
Minified + Gzipped
Latest Version
4.1.0
Package Id
jest-html-reporter@4.1.0
Unpacked Size
35.53 kB
Size
8.91 kB
File Count
5
NPM Version
10.9.2
Node Version
20.10.0
Published on
Mar 12, 2025
Cumulative downloads
Total Downloads
Last Day
1.8%
8,431
Compared to previous day
Last Week
1.3%
300,416
Compared to previous week
Last Month
-3.7%
1,210,186
Compared to previous month
Last Year
21.2%
12,168,487
Compared to previous year
2
21
📜
A Jest test results processor for generating a summary in HTML.
Inspired by karma-htmlfile-reporter
npm:
$ npm install jest-html-reporter --save-dev
yarn:
$ yarn add jest-html-reporter --dev
Configure Jest to process the test results by adding the following entry to the Jest config (jest.config.json):
1"reporters": [ 2 "default", 3 ["./node_modules/jest-html-reporter", { 4 "pageTitle": "Test Report" 5 }] 6]
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. Read more about these further down in this document.
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):
1{ 2 "testResultsProcessor": "./node_modules/jest-html-reporter" 3}
Note: When running as a testResultsProcessor, the configuration needs either to be placed within a new file named jesthtmlreporter.config.json
residing in the root folder
1{ 2 "pageTitle": "Test Report", 3}
or via adding a key to package.json
named "jest-html-reporter":
1{ 2 ... 3 "jest-html-reporter": { 4 "pageTitle": "Test Report", 5 } 6}
Option | Type | Default | Description |
---|---|---|---|
additionalInformation | Array<{ label: string; value: string; }> | null | A list of additional information to be added to the top of the report. |
append | boolean | false | Append test results to an existing report. |
boilerplate | string | null | Path to an HTML boilerplate file. The {jesthtmlreporter-content} variable will be replaced with test results. |
collapseSuitesByDefault | boolean | false | Collapse test suites (accordions) by default. |
customScriptPath | string | null | Path to an external script file injected into the report. |
dateFormat | string | yyyy-mm-dd HH:MM:ss | Date format for timestamps. See documentation for available formats. |
executionTimeWarningThreshold | number | 5 | Warn if a test suite exceeds this execution time (in seconds). |
includeConsoleLog | boolean | false | Include console.log outputs in the report (requires --verbose=false ). |
includeFailureMsg | boolean | false | Show detailed error messages for failed tests. |
includeStackTrace | boolean | true | Show stack traces for failed tests. |
includeSuiteFailure | boolean | false | Show detailed errors for entire failed test suites. |
includeObsoleteSnapshots | boolean | false | Show obsolete snapshot names. |
logo | string | null | Path to an image file to display in the report header. |
outputPath | string | ./test-report.html | Full path for the output report file (must end in .html ). |
pageTitle | string | "Test Report" | Title of the document and top-level heading. |
sort | string | null | Sort test results by a specific method. Available values: ➤ status → Sorts by test status (pending → failed → passed).➤ status:{custom-order} → Custom status order (e.g., "status:failed,passed,pending" ).➤ executionasc → Sorts by execution time ascending.➤ executiondesc → Sorts by execution time descending.➤ titleasc → Sorts by suite filename/test name ascending.➤ titledesc → Sorts by suite filename/test name descending. |
statusIgnoreFilter | string | null | Comma-separated list of statuses to exclude: "passed" , "pending" , "failed" . |
styleOverridePath | string | null | Path to a CSS file to override default styles. |
useCssFile | boolean | false | Link to the CSS file instead of inlining styles. |
All the configuration options provided in the table above are available via environment variables and follows the pattern of snake case in uppercase prepended with JEST_HTML_REPORTER_
Example: customScriptPath
-> JEST_HTML_REPORTER_CUSTOM_SCRIPT_PATH
*NOTE: Environment variables will take precedence over configurations set in jesthtmlreporter.config.json and package.json*
Here is an example of dynamically naming your output file and test report title to match your current branch that one might see in a automated deployment pipeline before running their tests.
1export BRANCH_NAME=`git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3` 2export JEST_HTML_REPORTER_OUTPUT_PATH=/home/username/jest-test-output/test-reports/"$BRANCH_NAME".html 3export JEST_HTML_REPORTER_PAGE_TITLE="$BRANCH_NAME"\ Test\ Report
No vulnerabilities found.
Reason
30 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
Found 0/11 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-03-31
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More