Skip to content

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.

Terminal window
npm install --save-dev @nijam/vitest-reporter

Add it to test.reporters and enable includeTaskLocation so Nijam can capture the failing line:

vitest.config.ts
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.

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 →