-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathvitest.config.ts
More file actions
38 lines (37 loc) · 855 Bytes
/
Copy pathvitest.config.ts
File metadata and controls
38 lines (37 loc) · 855 Bytes
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
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
import { fileURLToPath } from 'node:url';
export default defineConfig({
plugins: [sveltekit()],
resolve: {
alias: {
$lib: fileURLToPath(new URL('./src/lib', import.meta.url)),
},
},
test: {
environment: 'jsdom',
environmentMatchGlobs: [['src/lib/server/**', 'node']],
include: ['src/**/*.test.ts'],
exclude: ['node_modules', 'tests/**'],
setupFiles: ['./src/test-setup.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'lcov'],
thresholds: {
lines: 50,
functions: 50,
branches: 45,
statements: 50,
},
include: ['src/lib/**/*.ts'],
exclude: [
'**/*.test.ts',
'**/*.d.ts',
'**/types/**',
'src/lib/server/**',
'src/lib/stores/**',
'src/lib/utils/markdown.ts',
],
},
},
});