-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathvitest.config.ts
More file actions
51 lines (50 loc) · 1.14 KB
/
vitest.config.ts
File metadata and controls
51 lines (50 loc) · 1.14 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
import { defineConfig } from 'vitest/config';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import { resolve } from 'path';
export default defineConfig({
plugins: [svelte({ hot: !process.env.VITEST })],
test: {
include: ['src/**/*.{test,spec}.{js,ts}'],
globals: true,
environment: 'happy-dom',
env: {
STL_SKIP_AUTO_CLEANUP: '1'
},
setupFiles: ['./src/tests/setup.ts'],
testTimeout: 10000,
hookTimeout: 30000,
fileParallelism: true,
isolate: true,
alias: {
$lib: resolve('./src/lib'),
$app: resolve('./src/tests/mocks/app')
},
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'lcov'],
reportsDirectory: './coverage',
include: ['src/lib/**/*.{ts,svelte}'],
exclude: [
'src/lib/types/**',
'src/**/*.test.ts',
'src/**/*.spec.ts',
'src/tests/**'
],
reportOnFailure: true,
thresholds: {
statements: 0,
branches: 0,
functions: 0,
lines: 0
}
}
},
resolve: {
conditions: ['browser'],
alias: {
$lib: resolve('./src/lib'),
$app: resolve('./src/tests/mocks/app'),
'lucide-svelte': resolve('./src/tests/mocks/lucide-svelte.ts')
}
}
});