mirror of
https://github.com/bretzel-app/crumbs.git
synced 2026-10-12 20:06:57 +02:00
Add V8 coverage for unit tests via @vitest/coverage-v8 and Istanbul instrumentation for E2E tests via vite-plugin-istanbul. Coverage data is collected from browser pages after each Playwright test and merged with nyc. CI uploads both coverage reports as GitHub Actions artifacts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
471 B
TypeScript
22 lines
471 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import path from 'path';
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
$lib: path.resolve(__dirname, 'src/lib')
|
|
}
|
|
},
|
|
test: {
|
|
include: ['src/**/*.test.ts'],
|
|
environment: 'node',
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'html', 'lcov', 'json-summary'],
|
|
reportsDirectory: './coverage/unit',
|
|
include: ['src/lib/**/*.ts'],
|
|
exclude: ['src/lib/**/*.test.ts', 'src/lib/types/**']
|
|
}
|
|
}
|
|
});
|