Installation
@nijam/vitest-reporter is the Nijam reporter for
Vitest. It’s open source, fail-soft (it never breaks your test run), and uploads each run to the Nijam
ingestion API. It declares vitest (>= 1.0) as a peer dependency and works on Vitest 1 through 4.
Install
Section titled “Install”npm install --save-dev @nijam/vitest-reporterpnpm add -D @nijam/vitest-reporteryarn add -D @nijam/vitest-reporterbun add -d @nijam/vitest-reporterConfigure
Section titled “Configure”Add it to test.reporters and enable includeTaskLocation so Nijam can capture the failing line:
import { defineConfig } from 'vitest/config';import NijamReporter from '@nijam/vitest-reporter';
export default defineConfig({ test: { includeTaskLocation: true, // required to capture the failing line reporters: [ 'default', // keep your existing reporters new NijamReporter({ apiKey: process.env.NIJAM_API_KEY, projectId: '<your-project-uuid>', }), ], },});The two required options are apiKey and projectId - see Configuration
for the full list and where to find them.
Verify
Section titled “Verify”Run your suite with vitest run. If Nijam is reachable and the credentials are valid, the run shows up in
your project in the dashboard. If something’s off (bad key, wrong project,
network), the reporter prints a [nijam] warning and your tests still pass/fail exactly as before.
Next: Configuration →