🃏Jest Reporter
A Jest reporter for M00N Report. Streams results to the dashboard in real time, mirrors describe hierarchies as folders, tracks jest.retryTimes attempts independently, and surfaces snapshot statistics on the run summary. Requires Jest 27 or later.
Features
Test results stream to the dashboard via WebSocket as each test completes.
describe blocks map to folder hierarchy; nested describes nest.
Each jest.retryTimes attempt is recorded as a separate execution.
Thread-safe across Jest's parallel worker processes.
Reports added, updated, unmatched, and obsolete snapshot counts per run.
Each watch trigger opens a new launch; previous launches stay in history.
Optionally captures console.log/warn/error per test.
AI Setup Prompt
A complete, self-contained prompt for integrating this reporter into an existing Jest project using an AI assistant. The prompt covers installation, the canonical jest.config.js form, ES Modules and package.jsonvariants, environment-variable overrides, a verification checklist, and the most common integration pitfalls.
process.env.M00N_API_KEY in jest.config.js and supply it as a CI secret; never hard-code it in package.json.Configuration Reference
| Option | Type | Default | Description |
|---|---|---|---|
serverUrl | string | - | Required. M00N ingest service URL |
apiKey | string | - | Required. Project API key (identifies org and project) |
launch | string | - | Custom name for this test run |
tags | string[] | [] | Array of tags for this run |
attributes | object | {} | Custom key-value metadata; CI-related keys are picked up by the CI banner |
debug | boolean | false | Verbose reporter logging |
realtime | boolean | true | Stream per-test results over WebSocket as they complete |
includeConsole | boolean | false | Capture console.log/warn/error and attach to each test |
includeCoverage | boolean | false | Include the coverage summary (requires Jest itself to collect coverage) |
includeSnapshots | boolean | true | Include snapshot statistics on the run summary |
slowTestThreshold | number | 5000 | Threshold in ms for marking tests as slow |
CI/CD Context Banner
When you pass CI/CD-related attribute keys, M00N Report automatically displays them in a dedicated CI context banner at the top of the launch view. Any attributes that don't match the keys below are shown as regular attribute badges.
Recognized CI Attribute Keys
| Banner Field | Accepted Keys (case-insensitive) | Example Value |
|---|---|---|
| Pipeline | pipeline, GITHUB_WORKFLOW, CI_PIPELINE_NAME, JOB_NAME | Deploy Production |
| Branch | branch, git_branch, GITHUB_REF, CI_COMMIT_REF_NAME, BRANCH_NAME | main |
| Commit | commit, git_commit, GITHUB_SHA, CI_COMMIT_SHA, GIT_COMMIT | a1b2c3d (truncated to 7 chars) |
| Build # | build_number, GITHUB_RUN_NUMBER, CI_PIPELINE_ID, BUILD_NUMBER | 1234 |
| Build URL | build_url, GITHUB_SERVER_URL, CI_PIPELINE_URL, BUILD_URL | https://github.com/... (clickable) |
| Environment | environment, env, DEPLOY_ENV | staging |
| Trigger | trigger, GITHUB_EVENT_NAME, CI_PIPELINE_SOURCE | push |
branch and GITHUB_REF will display in the Branch field of the CI banner. Only the first match per field is used.Concepts
Reference documentation for each subsystem of the reporter: attachments, retry handling, auto-organization, snapshot tracking, console capture, watch mode, configuration sources, and troubleshooting.