-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
66 lines (64 loc) · 1.64 KB
/
vitest.config.ts
File metadata and controls
66 lines (64 loc) · 1.64 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
import path from 'node:path';
import { defineConfig } from 'vitest/config';
export default defineConfig({
define: {
__DEV__: false,
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
'@lib': path.resolve(__dirname, 'lib'),
'@types': path.resolve(__dirname, 'src/types'),
},
},
test: {
env: {
TZ: 'America/Sao_Paulo',
},
environment: 'node',
globals: true,
setupFiles: ['./test/setup.ts'],
server: {
deps: {
// test-renderer's ESM build uses extensionless sub-path imports
// (e.g. "react-reconciler/constants") which fail in strict ESM.
// Inlining lets Vite resolve them correctly.
inline: ['test-renderer'],
},
},
coverage: {
all: true,
provider: 'v8',
reporter: ['text', 'json', 'html'],
include: [
'lib/**/*.ts',
'src/**/*.ts',
'src/**/*.tsx',
'app/**/*.tsx',
],
exclude: [
'**/*.test.ts',
'**/*.test.tsx',
'**/*.d.ts',
'lib/supabase.ts',
'src/constants/assets.ts',
'src/constants/theme.ts',
'src/context/theme-context.tsx',
'src/components/balance/**',
'src/components/profile/**',
'src/components/ui/notification-permission-banner.tsx',
'src/components/ui/sticky-footer-screen.tsx',
'src/components/tasks/**',
'src/hooks/use-transient-message.ts',
'src/hooks/queries/index.ts',
'app/**/_layout.tsx',
],
thresholds: {
statements: 90,
lines: 90,
functions: 90,
branches: 85,
},
} as any,
},
});