Read OSS

vitest-dev/vitest

5 articles

Prerequisites

01

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.

02

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.

03

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.

04

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.

05

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.