@releaseqa/reporter-jest
v1.0.1
Published
ReleaseQA Jest Reporter - Report Jest test results to ReleaseQA
Maintainers
Readme
@releaseqa/jest
Jest reporter plugin for ReleaseQA. Automatically reports your Jest test results to ReleaseQA for tracking, analysis, and flaky test detection.
Installation
npm install --save-dev @releaseqa/jestQuick Start
Add the reporter to your Jest configuration:
// jest.config.js
module.exports = {
reporters: [
'default',
['@releaseqa/jest', {
apiKey: process.env.RELEASEQA_API_KEY,
}]
]
}That's it! Your test results will now be reported to ReleaseQA.
Configuration
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| apiKey | string | process.env.RELEASEQA_API_KEY | Your ReleaseQA API key |
| project | string | Auto-detected | Project name (defaults to package.json name) |
| tags | string[] | [] | Custom tags for filtering |
| baseUrl | string | https://releaseqa.com/api/v1 | API URL (for self-hosted) |
| debug | boolean | false | Enable debug logging |
TypeScript Configuration
// jest.config.ts
import type { Config } from 'jest'
const config: Config = {
reporters: [
'default',
['@releaseqa/jest', {
apiKey: process.env.RELEASEQA_API_KEY,
project: 'my-app',
tags: ['unit', 'frontend'],
}]
]
}
export default configEnvironment Variables
You can also configure the reporter via environment variables:
| Variable | Description |
|----------|-------------|
| RELEASEQA_API_KEY | Your ReleaseQA API key |
| RELEASEQA_PROJECT | Override project name |
| RELEASEQA_BASE_URL | Custom API URL |
Features
- Zero Configuration — Just add your API key
- Auto-detect CI Environment — Automatically captures branch, commit, and CI info
- Silent Failures — Never breaks your CI pipeline
- Batched Uploads — Efficient result submission
- Test Metadata — Captures file paths, error messages, and stack traces
Example Output
[ReleaseQA] Test run created: run_abc123
[ReleaseQA] Test run completed: https://releaseqa.com/dashboard/runs/run_abc123How It Works
The reporter hooks into Jest's reporter lifecycle:
- onRunStart — Creates a new test run in ReleaseQA
- onTestResult — Collects and batches test results
- onRunComplete — Flushes remaining results and marks the run as complete
License
MIT
