Skip to content
masterclass Buddy

Vitest · Command

vitest --coverage

Vitest can collect coverage with V8 or Istanbul. V8 is the default provider, and coverage collection must be enabled.

Last updated

Since
3.2.0

Syntax

test: { coverage: { provider: 'v8' | 'istanbul' | 'custom', enabled: boolean } }

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • @vitest/coverage-v8
  • @vitest/coverage-istanbul
  • coverage.clean
  • coverage.cleanOnRerun

Source: Coverage | Guide | Vitest. Checked 2026-11-03.