MeshiTrack/packages/api/vitest.config.ts

30 lines
740 B
TypeScript
Raw Normal View History

2026-03-27 14:50:34 +09:00
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'node',
2026-05-19 11:06:03 +09:00
include: ['tests/**/*.test.ts'],
2026-03-27 14:50:34 +09:00
coverage: {
provider: 'v8',
enabled: false, // enable via --coverage flag or test:cov script
2026-05-14 14:47:23 +09:00
all: true,
2026-03-27 14:50:34 +09:00
include: ['src/**/*.ts'],
exclude: [
'src/scripts/**',
'src/common/types.ts', // declaration merging only — no runtime logic
],
reporter: ['text', 'lcov', 'json-summary', 'html'],
reportsDirectory: './coverage',
thresholds: {
lines: 100,
functions: 100,
branches: 90,
statements: 100,
},
},
testTimeout: 10_000,
hookTimeout: 30_000,
},
});