Jest reporter
@brittlehq/jest-reporter plugs into Jest’s reporter slot. Results
stream to the hub one spec file at a time. The dashboard fills in
progressively rather than waiting for the whole suite to finish.
Install
Section titled “Install”pnpm add -D @brittlehq/jest-reporterConfigure
Section titled “Configure”Add the reporter to jest.config.js (or jest.config.ts):
module.exports = { reporters: [ 'default', [ '@brittlehq/jest-reporter', { url: process.env.BRITTLE_URL, token: process.env.BRITTLE_TOKEN, }, ], ],};'default' is Jest’s built-in reporter that prints to stdout. Keep
it; Brittle’s reporter sits next to it without interaction.
export BRITTLE_URL=https://brittle.your-domain.comexport BRITTLE_TOKEN=brt_svc_xxxxxxxxxxxxxxxxpnpm testWhat gets captured
Section titled “What gets captured”- Test result (pass / fail / skipped / todo) plus duration.
- Full error message + stack trace for any failure.
- Test environment name (
nodeorjsdom), extracted from Jest’stestEnvironmentconfig and shown on the Session Detail page. - The suite path (file + describe-block titles) so the dashboard shows the full breadcrumb, not just the leaf test name.
- Git commit + branch context, auto-detected.
Streaming model
Section titled “Streaming model”Results stream per-file as Jest finishes them, so triage can start mid-run on long suites.
Common stumbles
Section titled “Common stumbles”- Snapshot diffs are diff-only, not before/after. Brittle stores
the assertion’s error message (which Jest already includes the
-Expected/+Receiveddiff in). The actual snapshot file lives in your repo; the reporter doesn’t upload it. testRegexvstestMatchmatters. The reporter only knows about tests Jest actually executed. If your config excludes a file, Brittle never sees it.--maxWorkersdoesn’t split runs. Always one Run row perjestinvocation.
Options
Section titled “Options”Jest’s reporter accepts every shared option. It has no Jest-specific options.
Next steps
Section titled “Next steps”- Configuration reference for every option, type, and default.
- Reporter overview for concepts that apply to every framework.