test apps api
This commit is contained in:
43
vitest.api.config.ts
Normal file
43
vitest.api.config.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import { resolve } from 'node: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: true,
|
||||
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: 100,
|
||||
branches: 100,
|
||||
functions: 100,
|
||||
statements: 100,
|
||||
},
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@core': resolve(__dirname, './core'),
|
||||
'@adapters': resolve(__dirname, './adapters'),
|
||||
'@testing': resolve(__dirname, './testing'),
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user