-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
33 lines (27 loc) · 867 Bytes
/
vitest.config.ts
File metadata and controls
33 lines (27 loc) · 867 Bytes
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
import type { UserConfig } from 'vite';
import { configDefaults, defineConfig } from 'vitest/config';
// Check each package and demo
const testPathsToExclude = [
...configDefaults.exclude,
'**/.yalc/**',
'**/coverage/**',
'**/legacy-types/**',
'**/setupTests.ts',
'docs-website/**',
// Each external-test has its own test config, following the conventions of its framework, so they're not included
'external-tests/**',
];
const vitestConfig: UserConfig = defineConfig({
test: {
environment: 'jsdom',
// This gets resolved *per project* (each package, plus the root)
setupFiles: './setupTests.ts',
exclude: testPathsToExclude,
coverage: {
provider: 'v8',
exclude: [...(configDefaults.coverage.exclude || []), ...testPathsToExclude],
reporter: ['html', 'lcov'],
},
},
});
export default vitestConfig;