Back to Vitest

@vitest/coverage-istanbul

packages/coverage-istanbul/README.md

4.1.5781 B
Original Source

@vitest/coverage-istanbul

Vitest coverage provider that instruments code coverage via istanbul.

Installation

After installing the package, specify istanbul in the coverage.provider field of your Vitest configuration:

ts
// vitest.config.ts
import { defineConfig } from 'vitest/config'

export default defineConfig({
  test: {
    coverage: {
      provider: 'istanbul',
    },
  },
})

Then run Vitest with coverage:

sh
npx vitest --coverage

GitHub | Documentation