@spaguettiscope/vitest-reporter
v2.2.0
Published
Vitest reporter for SpaguettiScope — writes skeleton-aware test results to native format
Maintainers
Readme
@spaguettiscope/vitest-reporter
Vitest reporter for SpaguettiScope. Writes test
results to .spasco/results/ in the native spasco format, readable by the SpascoConnector.
Installation
pnpm install -D @spaguettiscope/vitest-reporterUsage
Add to your vitest.config.ts:
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
reporters: ['default', '@spaguettiscope/vitest-reporter'],
},
})Options
Pass options as the second element of the reporter tuple:
reporters: [
'default',
[
'@spaguettiscope/vitest-reporter',
{
workspaceRoot: '../..', // defaults to auto-detected monorepo root
outputDir: '.spasco/results', // defaults to {workspaceRoot}/.spasco/results
},
],
]Monorepo Setup
In a monorepo with multiple test packages, add the reporter to each package's vitest config. The
reporter auto-detects the workspace root (via pnpm-workspace.yaml, turbo.json, or package.json
with workspaces) and writes all results to a shared .spasco/results/ directory at the workspace
root.
For example, if you have:
apps/admin/vitest.config.tsapps/web/vitest.config.tspackages/database/vitest.config.ts
Add the reporter to each one. spasco init will list all the configs that need updating.
How It Works
Each test run creates a timestamped directory under .spasco/results/ containing:
meta.json— run metadata (vitest version, git info, timestamps, CI detection)results/{testCaseId}.json— one file per test case with name, status, duration, and inferred dimensions
The testCaseId is a deterministic hash of the source file + full test name, enabling deduplication
across runs.
