-
Notifications
You must be signed in to change notification settings - Fork 1
/
vitest.config.ts
65 lines (64 loc) · 1.75 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
import viteTsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [viteTsconfigPaths() as any],
test: {
globals: true,
environment: 'jsdom',
passWithNoTests: true,
setupFiles: ['src/tests/setupTests.ts', 'src/tests/browserMocks.ts'],
exclude: [
'dist',
'node_modules',
'src/tests',
'src/intro.stories.mdx',
'src/**/*.docs.mdx',
'src/storybook',
],
coverage: {
enabled: true,
provider: 'v8',
include: ['src/**/*'],
exclude: [
'src/**/*.d.ts',
'src/api/**',
'src/tests',
'src/types',
'src/**/*.test.ts',
'src/**/*.types.ts',
'src/**/*.test.tsx',
'src/**/*.stories.tsx',
'src/**/*.docs.mdx',
'src/**/stories/**',
'src/**/index.ts',
'src/components/DataDisplay/Tutorial/HighlightBlocks/*',
'src/components/Inputs/FieldSelector.tsx',
'src/components/Inputs/TextField.tsx',
'src/components/Feature/*',
'src/components/Feedback/Skeleton/**',
'src/utils/environment.ts',
'src/utils/export.ts',
'src/utils/UtilStory.tsx',
'src/providers/AuthProvider/**',
'src/hooks/useSignalRMessages.ts',
'src/hooks/useOnScreen.ts',
'src/components/Navigation/TopBar/Resources/FeedbackForm/**',
'src/storybook',
],
reporter: [
'text-summary',
'html',
['json-summary', { file: 'coverage.json' }],
],
reportOnFailure: true,
cleanOnRerun: false,
thresholds: {
perFile: true,
statements: 100,
branches: 100,
functions: 100,
lines: 100,
},
},
},
});