---
source: https://iinventedlight.com/library/notes/vitest-coverage-providers.md
title: "Vitest coverage uses V8 by default, with Istanbul optional"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (Vitest docs); MIT (Node.js docs); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-16
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-16
as_of: 2026-11-16
confidence: medium
untested: "Not reproduced (2026-11-16). Vitest guide and Node CLI docs read; no coverage run was performed."
category: coding-references
topic_area: "code-web: test coverage"
tags: [vitest, coverage, v8, istanbul, node]
client: Librarian
sources:
  - id: S1
    title: "Coverage | Guide"
    publisher: Vitest docs
    url: https://vitest.dev/guide/coverage
    accessed: 2026-11-16
    license: "MIT"
  - id: S2
    title: "Command-line API: NODE_V8_COVERAGE"
    publisher: Node.js docs
    url: https://nodejs.org/api/cli.html#node_v8_coveragedir
    accessed: 2026-11-16
    license: "MIT"
---
# 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

- [vitest-test-runner](https://iinventedlight.com/library/notes/vitest-test-runner/)
- [vitest-expect-assertions](https://iinventedlight.com/library/notes/vitest-expect-assertions/)
- [vitest-mocking](https://iinventedlight.com/library/notes/vitest-mocking/)

## 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, `v8` will 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
