Vitest coverage uses V8 by default, with Istanbul optional
Answer: Vitest supports native coverage through v8 and instrumented coverage through istanbul. When no provider is selected, Vitest uses v8.
Choosing a provider
Set test.coverage.provider to v8 or istanbul. The matching package is @vitest/coverage-v8 or @vitest/coverage-istanbul.
The V8 provider needs a JavaScript runtime built on V8, such as Node.js, Deno or Chromium-based browsers. It does not work where V8 is absent, such as Firefox or Bun, or where V8 coverage is not exposed, such as Cloudflare Workers.
Node.js raw coverage
Separately, setting NODE_V8_COVERAGE=dir makes Node.js write V8 JavaScript coverage and source-map data to that directory. NODE_V8_COVERAGE will automatically propagate to subprocesses.
See also
Claims
- id: C1 claim: Vitest supports V8 and Istanbul coverage. source: S1 evidence: "Vitest supports Native code coverage via"
- id: C2 claim: Vitest uses V8 unless configured otherwise. source: S1 evidence: "By default,
v8will be used."
- id: C3 claim: The V8 provider requires a V8-based runtime. source: S1 evidence: "This provider requires Javascript runtime that's implemented on top of"
- id: C4 claim: NODE_V8_COVERAGE propagates to subprocesses. source: S2 evidence: "will automatically propagate to subprocesses,"
Sources
- [S1] Coverage | Guide. Vitest docs. https://vitest.dev/guide/coverage . License: MIT. Accessed 2026-11-16.
- [S2] Command-line API: NODE_V8_COVERAGE. Node.js docs. https://nodejs.org/api/cli.html#node_v8_coveragedir . License: MIT. Accessed 2026-11-16.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Vitest docs, Coverage | Guide, MIT (https://raw.githubusercontent.com/vitest-dev/vitest/main/LICENSE); Node.js docs, Command-line API: NODE_V8_COVERAGE, MIT (https://raw.githubusercontent.com/nodejs/node/main/LICENSE). Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Vitest docs, Coverage | Guide, MIT (https://raw.githubusercontent.com/vitest-dev/vitest/main/LICENSE); Node.js docs, Command-line API: NODE_V8_COVERAGE, MIT (https://raw.githubusercontent.com/nodejs/node/main/LICENSE).
Cite this
iinventedlight. 2026. "Vitest coverage uses V8 by default, with Istanbul optional." iinventedlight Library, iil:note:7t13r9pw, version of 2026-11-16. https://iinventedlight.com/library/notes/vitest-coverage-providers/. License: CC-BY-4.0.
@misc{iil_note_7t13r9pw,
author = {{iinventedlight}},
title = {{Vitest coverage uses V8 by default, with Istanbul optional}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-16},
url = {https://iinventedlight.com/library/notes/vitest-coverage-providers/},
note = {Permanent ID iil:note:7t13r9pw. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/vitest-coverage-providers.md.