-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathvitest.config.ts
More file actions
68 lines (66 loc) · 1.82 KB
/
vitest.config.ts
File metadata and controls
68 lines (66 loc) · 1.82 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
65
66
67
68
import { configDefaults, defineConfig } from 'vitest/config'
export default defineConfig({
test: {
globals: true,
setupFiles: ['./.vitest.config/setup-vitest.ts'],
coverage: {
enabled: true,
provider: 'v8',
reportsDirectory: './coverage/raw/default',
reporter: ['json', 'text', 'html'],
exclude: [
...(configDefaults.coverage.exclude ?? []),
'benchmarks',
'runtime-tests',
'build/build.ts',
'src/test-utils',
'perf-measures',
// types are compile-time only, so their coverage cannot be measured
'src/**/types.ts',
'src/jsx/intrinsic-elements.ts',
'src/utils/http-status.ts',
],
},
projects: [
'./runtime-tests/*/vitest.config.ts',
{
esbuild: {
jsx: 'automatic',
jsxImportSource: './src/jsx',
},
extends: true,
test: {
exclude: [...configDefaults.exclude, '**/sandbox/**', '**/*.case.test.*'],
include: [
'src/**/(*.)+(spec|test).+(ts|tsx|js)',
'scripts/**/(*.)+(spec|test).+(ts|tsx|js)',
'build/**/(*.)+(spec|test).+(ts|tsx|js)',
],
name: 'main',
},
},
{
esbuild: {
jsx: 'automatic',
jsxImportSource: './src/jsx',
},
extends: true,
test: {
include: ['src/jsx/dom/**/(*.)+(spec|test).+(ts|tsx|js)', 'src/jsx/hooks/dom.test.tsx'],
name: 'jsx-runtime-default',
},
},
{
esbuild: {
jsx: 'automatic',
jsxImportSource: './src/jsx/dom',
},
extends: true,
test: {
include: ['src/jsx/dom/**/(*.)+(spec|test).+(ts|tsx|js)', 'src/jsx/hooks/dom.test.tsx'],
name: 'jsx-runtime-dom',
},
},
],
},
})