MeshiTrack/packages/api/vitest.config.ts

29 lines
741 B
TypeScript

import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'node',
include: ['tests/**/*.test.ts'],
coverage: {
provider: 'v8',
enabled: false, // enable via --coverage flag or test:cov script
all: true,
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: 100,
statements: 100,
},
},
testTimeout: 10_000,
hookTimeout: 30_000,
},
});