CodeVetter · Repo Unpack · Feature catalog
vitest-dev/vitest
The inspected public surface spans test authoring, command-line execution, project selection, browser testing, and result inspection. Assertions, mocking, fixtures, and snapshots integrate with the same runner lifecycle. Coverage and reporter outputs support both local feedback and CI consumption. The catalog groups related capabilities into eight areas and is bounded by the inspected sources.
- CLI commands include run, related, watch/dev, bench, init, doctor, and list; init accepts only browser, while list branches between collected tests and files-only output.
- Public APIs export describe/it/test/suite, before/after and around hooks, completion hooks, and artifact recording; test.extend supports fixture definitions with scoped dependency restrictions.
- The public assertion surface exports Chai, assert, expect, and vi; vi exposes fake timers, spies, and module mocking, and built-in environments include node, jsdom, happy-dom, and edge-runtime.
- Snapshots support external files, inline source updates, and raw files; custom composable matchers include standard, file, and domain snapshot helpers.
- Projects can nest through container configurations and expand into browser-instance and benchmark variants; CLI selection includes related files, filename/location filters, and sequencer-based sharding.
- Browser testing integrates provider initialization and bounded session scheduling, with registered commands for filesystem operations, screenshots, screenshot matching, and trace recording.
- Coverage supports v8, Istanbul, and a custom provider module; built-in browser loading selects a /browser provider entrypoint, and run finalization generates and reports coverage.
- Results are available through dashboard, file details, coverage, browser, and trace UI components, plus JSON, JUnit, TAP, GitHub Actions, and blob reporters; mergeReports replays saved runs.