-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
38 lines (37 loc) · 1.11 KB
/
vitest.config.ts
File metadata and controls
38 lines (37 loc) · 1.11 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
import path from 'path';
import { defineConfig } from 'vitest/config';
import { COVERAGE_THRESHOLDS } from './scripts/coverage-utils';
export default defineConfig({
test: {
include: ['example/**/*.test.{ts,tsx}', 'src/**/*.test.{ts,tsx}'],
exclude: ['node_modules/**', 'example/node_modules/**', 'example/e2e/**'],
coverage: {
provider: 'istanbul',
reporter: ['text', 'json', 'html', 'lcov'],
include: ['src/**/*.{ts,tsx}'],
exclude: [
'node_modules',
'example/e2e',
'src/**/*.test.{ts,tsx}',
'src/tests/**/*.{ts,tsx}',
'src/**/tests/*.{ts,tsx}',
'src/client/**/*.{ts,tsx}',
'src/components/JsonSchemaComparison/**/*.{ts,tsx}',
],
thresholds: {
lines: COVERAGE_THRESHOLDS.lines,
functions: COVERAGE_THRESHOLDS.functions,
branches: COVERAGE_THRESHOLDS.branches,
statements: COVERAGE_THRESHOLDS.statements,
},
},
globals: true,
environment: 'jsdom',
setupFiles: ['./vitest-setup.ts'],
},
resolve: {
alias: {
'@': path.resolve(__dirname, './'),
},
},
});