mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 23:14:12 +00:00
- Add 30-minute job-level timeouts for Tests and E2E Tests - Add step-level timeouts: 10min unit tests, 15min integration/e2e - Add vitest testTimeout (30s) and hookTimeout (30s) Prevents infinite retry loops from blocking CI for hours. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
39 lines
1 KiB
TypeScript
39 lines
1 KiB
TypeScript
import { defineConfig } from 'vitest/config'
|
|
import react from '@vitejs/plugin-react'
|
|
import tsconfigPaths from 'vite-tsconfig-paths'
|
|
|
|
export default defineConfig({
|
|
plugins: [tsconfigPaths(), react()],
|
|
test: {
|
|
environment: 'jsdom',
|
|
setupFiles: ['./vitest.setup.ts'],
|
|
testTimeout: 30000, // 30 seconds per test
|
|
hookTimeout: 30000, // 30 seconds for beforeAll/afterAll
|
|
include: [
|
|
'tests/int/**/*.int.spec.ts',
|
|
'tests/unit/**/*.unit.spec.ts',
|
|
],
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'text-summary', 'html', 'lcov'],
|
|
reportsDirectory: './coverage',
|
|
include: [
|
|
'src/lib/**/*.ts',
|
|
'src/hooks/**/*.ts',
|
|
'src/app/**/api/**/route.ts',
|
|
],
|
|
exclude: [
|
|
'src/**/*.d.ts',
|
|
'src/**/payload-types.ts',
|
|
'node_modules/**',
|
|
],
|
|
// Initial thresholds - increase as test coverage improves
|
|
thresholds: {
|
|
lines: 35,
|
|
functions: 50,
|
|
branches: 65,
|
|
statements: 35,
|
|
},
|
|
},
|
|
},
|
|
})
|