-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
48 lines (47 loc) · 1.16 KB
/
vite.config.ts
File metadata and controls
48 lines (47 loc) · 1.16 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
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [sveltekit()],
test: {
name: 'unit',
include: ['src/**/*.{test,spec}.{js,ts}', 'tests/**/*.{test,spec}.{js,ts}'],
exclude: ['node_modules', 'tests/e2e/**'],
environment: 'happy-dom',
globals: true,
setupFiles: ['./tests/setup.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
exclude: [
'node_modules/',
'tests/',
'*.config.{js,ts}',
'**/*.d.ts',
'**/*.test.{js,ts}',
'**/*.spec.{js,ts}',
'.svelte-kit/',
'build/',
'scripts/',
// Svelte components contain UI logic that's hard to unit test branches
// These are tested via E2E tests for user interaction flows
'**/*.svelte',
// Page route type files that just define load types
'src/routes/**/+page.ts',
// Hooks are tested implicitly through integration tests
'src/hooks.server.ts'
],
thresholds: {
lines: 90,
functions: 90,
branches: 90,
statements: 90
}
},
poolOptions: {
threads: {
singleThread: true
}
},
teardownTimeout: 5000
}
});