chore: add test coverage

This commit is contained in:
Ali BARIN
2024-11-21 14:54:55 +00:00
parent 823a2c8b73
commit 09335fcd79
4 changed files with 340 additions and 307 deletions

View File

@@ -2,8 +2,25 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
root: './',
environment: 'node',
setupFiles: ['./test/setup/global-hooks.js'],
globals: true,
reporters: process.env.GITHUB_ACTIONS ? ['dot', 'github-actions'] : ['dot'],
coverage: {
reportOnFailure: true,
provider: 'v8',
reportsDirectory: './coverage',
reporter: ['text', 'lcov'],
all: true,
include: ['**/src/models/**', '**/src/controllers/**'],
thresholds: {
autoUpdate: true,
statements: 93.41,
branches: 93.46,
functions: 95.95,
lines: 93.41,
},
},
},
});