Files
agentic-dev/docs/library-decisions/2026-05-14-vitest.md
Danijel Martinek f77e6ea881 chore(template): clean-slate template snapshot from bb4a0c7
Curated, product-agnostic snapshot of the post-story-04 tree: demo
content deleted, auth-only reference feature, web-next shell, all gates
green. Product-specific docs, ADRs 027-029, PRDs/epics/archive, editor
library traces, and product naming are curated out; generic template
repairs (coverage provider devDeps, root test:coverage script, live
lint fixes, root-only release-please) are kept. See TEMPLATE.md for
provenance, curation list, and usage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
2026-07-12 20:40:54 +02:00

2.9 KiB

package, version, tier, decision, date, deciders, adr, lastRevalidated, is-sub-processor, processes-pii, filter-results, verification-commands, accepted-cves
package version tier decision date deciders adr lastRevalidated is-sub-processor processes-pii filter-results verification-commands accepted-cves
vitest ^3.0.0 core approved 2026-05-14
Danijel Martinek
null null false false
license types maintenance boundary-fit shadow-check eu-residency cve-scan named-consumer socketRisk
MIT native active pass pass n/a clean pass clean
npm view vitest license
npm view vitest version
pnpm audit --audit-level=moderate

Filter: license

npm view vitest license returns MIT. MIT is on the allowlist.

Filter: types

vitest is authored in TypeScript and ships its own .d.ts declaration files. No separate @types/vitest package is needed.

Filter: maintenance

Actively maintained by the Vite / Vitest team. The 3.x line is the current major. Regular releases with strong community momentum in the Vite ecosystem.

Filter: boundary-fit

vitest is listed as a runtime dependency of @repo/core-testing because it provides the test runner APIs (describe, it, expect, vi) that core-testing re-exports or uses in its test utilities. All feature packages declare vitest as a devDependency. This is the correct placement for a testing infrastructure package.

Filter: shadow-check

vitest is the sole test runner in the workspace. No competing runner (Jest, Jasmine, Mocha) is present.

Filter: eu-residency

vitest is a local test runner with no network communication to vendor-controlled endpoints. EU residency does not apply.

Filter: cve-scan

pnpm audit --audit-level=moderate reports no advisories against vitest at the time of this trace.

Filter: named-consumer

@repo/core-testing lists vitest as a runtime dependency. Every feature package uses vitest as a devDependency for running tests. Named, non-hypothetical consumers exist today.

Prompt: replaces

vitest replaces Jest as the test runner. The Vite-based transformation pipeline eliminates the need for Babel transforms and provides native ES module support, reducing test suite configuration complexity.

Prompt: migration-cost-out

Hard. vitest's describe / it / expect / vi.fn() APIs are used in every test file across all packages. Migrating to Jest or another runner requires updating all test files (largely mechanical API renames) and reconfiguring the coverage pipeline (ADR-020 L0 thresholds, @vitest/coverage-v8).

Prompt: alternatives-considered

  1. Jest — Mature but requires additional Babel/ESM configuration in a Vite-based monorepo; vitest provides native compatibility.
  2. Node.js node:test — Lightweight but lacks the ecosystem integrations (coverage, snapshot, mocking) that vitest provides out of the box.