-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
56 lines (55 loc) · 1.31 KB
/
Copy pathvitest.config.ts
File metadata and controls
56 lines (55 loc) · 1.31 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
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import path from 'path';
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, '.'),
'server-only': path.resolve(__dirname, './tests/support/server-only.ts'),
},
},
test: {
environment: 'jsdom',
globals: true,
setupFiles: './vitest.setup.ts',
include: [
'blog/**/*.test.ts',
'blog/**/*.test.tsx',
'infra/**/*.test.ts',
'infra/**/*.test.tsx',
'resume/**/*.test.ts',
'resume/**/*.test.tsx',
'ui/**/*.test.ts',
'ui/**/*.test.tsx',
'site/**/*.test.ts',
'site/**/*.test.tsx',
'app/**/*.test.ts',
'app/**/*.test.tsx',
'styles/**/*.test.ts',
'tooling/**/*.test.ts',
],
coverage: {
provider: 'v8',
include: [
'blog/**/*.{ts,tsx}',
'infra/**/*.{ts,tsx}',
'resume/**/*.{ts,tsx}',
'ui/**/*.{ts,tsx}',
'site/**/*.{ts,tsx}',
'app/**/*.{ts,tsx}',
'styles/**/*.{ts,tsx}',
],
exclude: [
'tests/support/**',
'**/*.types.ts',
'**/index.ts',
'**/index.tsx',
'**/*.test.ts',
'**/*.test.tsx',
'**/*.spec.ts',
'**/*.spec.tsx',
],
},
},
});