ci: add test coverage reporting with v8 provider
- Add vitest.config.ts with v8 coverage provider - Add npm run test:coverage script - Add coverage step to CI (Node 22, reports in job summary) - Coverage tracks src/lib/ utilities (currently ~21% lines) - Install @vitest/coverage-v8 dev dependency
This commit is contained in:
16
vitest.config.ts
Normal file
16
vitest.config.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { defineConfig } from 'vitest/config'
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'node',
|
||||
include: ['src/**/__tests__/**/*.test.{ts,tsx}'],
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'text-summary', 'json-summary'],
|
||||
include: ['src/lib/**/*.ts'],
|
||||
exclude: ['src/lib/__tests__/**'],
|
||||
// Thresholds intentionally unset — coverage is tracked, not enforced yet.
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user