-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.coverage.config.ts
More file actions
64 lines (63 loc) · 1.54 KB
/
vitest.coverage.config.ts
File metadata and controls
64 lines (63 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vitest/config';
import { sveltekit } from '@sveltejs/kit/vite';
// Special coverage-only configuration for CI/CD pipelines
// This config avoids SSR conflicts by simplifying the test setup
export default defineConfig({
plugins: [
tailwindcss(),
sveltekit()
// Codecov plugin disabled in coverage mode to prevent conflicts
],
test: {
expect: { requireAssertions: true },
testTimeout: 60000, // Increased timeout for coverage analysis
hookTimeout: 20000,
// Single-project mode to avoid SSR conflicts
environment: 'node',
include: ['src/**/*.{test,spec}.{js,ts}'],
exclude: [
'src/**/*.svelte.{test,spec}.{js,ts}',
'src/lib/server/**',
'src/routes/**', // Exclude SSR routes
'node_modules/',
'static/',
'scripts/',
'build/',
'dist/'
],
coverage: {
enabled: true,
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
exclude: [
'node_modules/',
'src/test/',
'**/*.config.{js,ts}',
'**/*.spec.{js,ts}',
'**/*.svelte.spec.{js,ts}',
'static/',
'scripts/',
'.env.*',
'build/',
'dist/',
'sample-templates/',
'roadmap/',
'coverage/',
'src/routes/**', // Exclude SSR routes
'src/**/*.svelte', // Exclude Svelte components
'src/lib/server/**' // Exclude server-only code
],
include: [
'src/lib/**/*.{js,ts}'
],
// Coverage thresholds for service layer
/*thresholds: {
lines: 85,
functions: 90,
branches: 80,
statements: 85
}*/
}
}
});