mirror of
https://github.com/hanzoai/vitest.git
synced 2026-10-30 14:46:34 +00:00
19 lines
520 B
TypeScript
19 lines
520 B
TypeScript
import assert from 'node:assert';
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
export default defineConfig({
|
|
plugins: [{
|
|
name: "coverage-options-by-runtime-plugin",
|
|
configureVitest(context) {
|
|
const coverage = context.vitest.config.coverage
|
|
assert(coverage.provider === "v8" || coverage.provider === "istanbul")
|
|
|
|
coverage.include ||= []
|
|
coverage.include.push("**/even.ts");
|
|
coverage.include.push("**/untested-file.ts");
|
|
|
|
coverage.exclude.push("**/math.ts");
|
|
},
|
|
}],
|
|
})
|