-
Notifications
You must be signed in to change notification settings - Fork 393
/
vitest.config.mjs
54 lines (53 loc) · 2.04 KB
/
vitest.config.mjs
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
import { defineConfig } from 'vitest/config';
// The root vitest.config.mjs should only define workspace-level configuration, such as code coverage
// See: https://github.com/vitest-dev/vitest/discussions/3852
export default defineConfig({
test: {
coverage: {
provider: 'v8',
exclude: [
// Ignore test files, config files, scripts, deps, and generated files
'**/*.config.*',
'**/.nx-cache/**',
'**/.rollup.cache/**',
'**/__tests__/**',
'**/dist/**',
'**/node_modules/**',
'**/scripts/**',
'**/vitest.*',
// Ignore browser-only modules which are only lightly tested in unit tests
// These are mostly tested in integration/karma tests
'**/packages/@lwc/aria-reflection/**',
'**/packages/@lwc/engine-dom/**',
'**/packages/@lwc/engine-core/**',
'**/packages/@lwc/synthetic-shadow/**',
// Ignore test packages
'**/packages/@lwc/integration-karma/**',
'**/packages/@lwc/integration-tests/**',
'**/packages/@lwc/integration-types/**',
'**/packages/@lwc/perf-benchmarks-components/**',
'**/packages/@lwc/perf-benchmarks/**',
'**/playground/**',
// These are not production-ready yet
'**/packages/@lwc/ssr-compiler/**',
'**/packages/@lwc/ssr-runtime/**',
// This just re-exports other packages
'**/packages/lwc/**',
],
thresholds: {
branches: 95,
functions: 95,
lines: 95,
statements: 95,
},
reporter: [
'clover',
'html',
'json',
'lcov',
'text',
['text', { file: 'coverage.txt' }],
],
},
},
});