vitest-dev/vitest
5 articles
Prerequisites
- ›Basic understanding of Vite (dev server, plugins, module transforms)
- ›Familiarity with npm/pnpm workspaces and monorepo concepts
- ›Working knowledge of TypeScript
Vitest Architecture Overview: How a Vite-Powered Testing Framework Is Organized
A high-level tour of Vitest's monorepo structure, its 17 packages, the critical separation between Node orchestration and worker runtime domains, and how Vite serves as the backbone.
From CLI to Config: How Vitest Boots and Resolves Configuration
Traces the complete boot sequence from the vitest binary through CLI parsing, config file discovery, Vite server creation, the VitestPlugin hook lifecycle, and config serialization for workers.
The Pool System: How Vitest Distributes and Executes Tests Across Workers
Explores Vitest's three-layer pool architecture, the birpc communication bridge between Node and worker domains, worker boot sequences, and test result collection.
Inside @vitest/runner: Test Collection, Execution, and the Hook System
Dives into the framework-agnostic @vitest/runner package that defines the test DSL, collects test files into a task tree, executes tests with hooks and fixtures, and manages concurrency and retries.
Reporters, Coverage, and Extending Vitest: The Output and Plugin Layer
Covers the reporter lifecycle, coverage providers, test sequencers, the WebSocket API for the UI, the programmatic Node API, and the sub-package architecture for expect/spy/snapshot.