-
Notifications
You must be signed in to change notification settings - Fork 2
/
vitest.config.ts
71 lines (70 loc) · 1.72 KB
/
vitest.config.ts
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
69
70
71
import viteTsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [viteTsconfigPaths() as any],
optimizeDeps: {
include: ['react/jsx-dev-runtime'],
},
test: {
globals: true,
passWithNoTests: true,
includeTaskLocation: true,
testTimeout: 15000,
fileParallelism: false,
pool: 'threads',
env: {
VITE_IS_MOCK: 'true',
VITE_NAME: 'Amplify components',
VITE_ENVIRONMENT_NAME: 'local',
VITE_API_CLIENT_ID: 'fake-id'
},
exclude: [
'dist',
'node_modules',
'src/tests',
'src/intro.stories.mdx',
'src/**/*.docs.mdx',
'src/storybook',
'.idea'
],
coverage: {
enabled: false,
cleanOnRerun: false,
provider: 'v8',
include: [
'src/atoms/**/*',
'src/molecules/**/*',
'src/organisms/**/*',
'src/providers/**/*',
],
exclude: [
'src/**/*.d.ts',
'src/**/*.test.ts',
'src/**/*.types.ts',
'src/**/*.jsdom.test.tsx',
'src/**/*.test.tsx',
'src/**/*.stories.tsx',
'src/**/*.docs.mdx',
'src/**/stories/**',
'src/**/index.ts',
'src/atoms/utils/auth_environment.ts',
'src/atoms/utils/export.ts',
'src/atoms/utils/UtilStory.tsx',
'src/providers/AuthProvider/**',
'src/hooks/useSignalRMessages.ts',
'src/hooks/useOnScreenMultiple.ts',
],
reporter: [
'text-summary',
'html',
['json-summary', { file: 'coverage.json' }],
],
reportOnFailure: true,
thresholds: {
perFile: true,
autoUpdate: true,
100: true,
},
},
},
});