@elliotjreed/vitest-minimal-reporter
v1.1.0
Published
Minimal Vitest reporter optimised for LLM token efficiency
Maintainers
Readme
@elliotjreed/vitest-minimal-reporter
A minimal Vitest reporter optimised for LLM token efficiency. Shows only failing tests and a concise summary, reducing noise in AI coding assistant contexts.
Installation
npm install --save-dev @elliotjreed/vitest-minimal-reporteror with Bun:
bun add --dev @elliotjreed/vitest-minimal-reporterUsage
Add the reporter to your Vitest configuration:
// vitest.config.ts
import { defineConfig } from "vitest/config";
import MinimalReporter from "@elliotjreed/vitest-minimal-reporter";
export default defineConfig({
test: {
reporters: [new MinimalReporter()],
},
});Output format
Only failing tests are shown, each with the relative file path, test name, and error message:
FAIL src/validation.test.ts > should validate email
Expected true but received false
FAIL src/auth.test.ts > Authentication > Login > should reject invalid password
Password incorrect
Test Files 1 failed | 2 passed (3)
Tests 2 failed | 8 passed (10)
Duration 1.23sWhen all tests pass, only the summary is output:
Test Files 3 passed (3)
Tests 10 passed (10)
Duration 0.98sDevelopment
Setup
bun installTesting
bun run testBuilding
bun run buildType checking
bun run typecheckPublishing
Build the package:
bun run buildUpdate the version in
package.jsonfollowing semantic versioning.Publish to npm:
npm publish --access publicCommit and tag the release:
git add package.json git commit -m "Release v1.0.0" git tag v1.0.0 git push && git push --tags
Licence
MIT - See LICENSE
