Free tool
Jest and Vitest results, as a page anyone can open.
Drop the JSON from jest --json or vitest run --reporter=json. Get the test files that failed to run, failed tests with the describe path, file:line and the assertion diff, flaky tests that passed on retry, a per-file table and the slowest tests — as one HTML file. Copy a Markdown summary for the pull request, or send the link to whoever has to look.
1 of 10 tests failed · 1 test file failed to run · 1 flaky · 1 skipped · 1 todo · 4.4 s
Publishes this report on Comma: one URL that outlives the CI artifact, restricted to named people or your company’s email domain if you like, comments pinned to the test that failed, and the next run kept as a revision you can diff. Free, no card.
How the results are read
- The verdict fails on a failed test, a test file that failed to run, an interrupted run or a snapshot mismatch — the same things that make
jestexit with code 1. - Files that failed to run come first. A missing import or a syntax error fails the file before any test starts, so its tests are absent from the counts rather than red.
- Failed tests show the describe path,
file:line, retries and every failure message with the Expected/Received diff and stack, colour codes removed. - Flaky tests passed after
jest.retryTimes()retried them. They pass CI, so they get their own list with the earlier failure. - Skipped and todo:
it.skip,xitand filtered tests count as skipped;it.todogets its own list so the backlog is visible.
Getting the JSON
| From | How |
|---|---|
| Jest | npx jest --json --outputFile=results.json --testLocationInResults |
| Vitest | npx vitest run --reporter=json --outputFile=results.json |
| vitest.config | test: { reporters: ['default', 'json'], outputFile: 'results.json' } |
| npm script | npm test -- --json --outputFile=results.json |
| GitHub Actions | upload results.json with actions/upload-artifact, if: ${{ !cancelled() }} |
Use --outputFile: without it Jest prints the JSON to stdout, mixed with anything else the script echoes (the tool skips to the first {"num, but a clean file is safer). --json keeps the normal terminal output on stderr, so CI logs still read as usual.
When the test run has to leave CI
A red build is read by more people than the one who pushed it: the reviewer deciding whether to approve, the teammate whose test broke, the lead asking whether main is safe to release. The job log is thousands of lines and the artifact expires. Published to Comma, the run is one link with comments on the failing test, and an agent can publish it from the pipeline after every run as a new revision of the same report — so today’s failures sit next to yesterday’s.
Questions
- How do I turn Jest results into an HTML report?
- Run npx jest --json --outputFile=results.json and drop the file here. You get a pass/fail verdict, test files that failed to run, failed tests with the describe path, file and line and the assertion diff, flaky tests that passed on retry, a per-file table, the slowest tests and the todo list. Download it as one HTML file, copy a Markdown summary, or publish it as a link — no jest-html-reporter install or config change needed.
- Does it work with Vitest?
- Yes. vitest run --reporter=json --outputFile=results.json writes the same Jest-compatible shape, so the report is identical; the tool labels the run Vitest. In vitest.config add reporters: ['default', 'json'] with outputFile: 'results.json' to keep the terminal output too. Bun's and Deno's test runners write JUnit XML instead — use the JUnit XML viewer.
- What does “failed to run” mean?
- Jest reports a test file whose tests never started — a syntax error, a module it can't resolve, an exception at import time, a broken setupFiles — as a failed suite with zero failed tests and the error in its message. The pass/fail counts look fine while a whole file of tests is missing, so the report lists those files first.
- How are flaky tests detected?
- Jest 29.2+ records retryReasons for every test retried by jest.retryTimes(); a test that passed with a non-empty retryReasons failed first and then passed. The report lists them separately with the earlier failure, because they pass CI and are usually the next red build. Without jest.retryTimes nothing is retried, so nothing is marked flaky.
- Why are file and line numbers missing?
- Jest only writes each test's line when you pass --testLocationInResults. File paths are always present; the tool cuts the shared directory (like /home/runner/work/repo/repo/) so rows read src/cart/cart.test.ts.
- Can I post the results on a pull request?
- Yes. “Copy Markdown” gives a GitHub-flavored verdict line, the counts, files that failed to run, a table of failed tests with the first error line and the flaky list — paste it into a PR comment or append it to $GITHUB_STEP_SUMMARY. Link the published report for the full diff and stack trace.
- Is my report uploaded?
- No. The JSON is parsed and the report is built in your browser. It only leaves your machine if you click “Get a shareable link” and publish it to Comma — and then you choose who can open it.
Related: Jest HTML report not generated · Share a Jest report · Share a Vitest report · JUnit XML viewer · Playwright report viewer · Coverage viewer · all free tools