← All notes

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

Sources

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

Permanent ID: iil:note:7t13r9pw

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.},
}

Markdown

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.