43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import * as path from 'path';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
watch: false,
|
|
environment: 'node',
|
|
setupFiles: ['reflect-metadata'],
|
|
include: ['apps/api/src/**/*.{test,spec}.ts'],
|
|
exclude: ['node_modules/**', 'apps/api/dist/**', 'dist/**'],
|
|
coverage: {
|
|
enabled: false,
|
|
provider: 'v8',
|
|
reportsDirectory: 'coverage/api',
|
|
reporter: ['text', 'html', 'lcov'],
|
|
// "Logic only" coverage scope: service layer only.
|
|
// (Presenters have wide surface area; once all presenter suites exist, we can add them back.)
|
|
include: ['apps/api/src/domain/**/*Service.ts'],
|
|
exclude: [
|
|
'**/*.test.ts',
|
|
'**/*.spec.ts',
|
|
'**/*.d.ts',
|
|
'apps/api/dist/**',
|
|
'dist/**',
|
|
'node_modules/**',
|
|
],
|
|
thresholds: {
|
|
lines: 95,
|
|
branches: 90,
|
|
functions: 95,
|
|
statements: 95,
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@core': path.resolve(__dirname, './core'),
|
|
'@adapters': path.resolve(__dirname, './adapters'),
|
|
'@testing': path.resolve(__dirname, './testing'),
|
|
},
|
|
},
|
|
}); |