-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
47 lines (45 loc) · 1.43 KB
/
Copy pathvite.config.ts
File metadata and controls
47 lines (45 loc) · 1.43 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
39
40
41
42
43
44
45
46
47
/// <reference types="vitest" />
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'happy-dom',
watch: false,
// Exclude e2e tests from Vitest (they use TestCafe)
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/e2e/**',
'**/.{idea,git,cache,output,temp}/**',
],
// NEW: Add worker configuration
// worker: { // 'worker' does not exist in type 'InlineConfig'.
// format: 'es',
// },
// Enable coverage
coverage: {
// Specify the provider
provider: 'v8',
// Specify which files to include in the coverage report
include: ['packages/core/src/**/*.ts'],
// Specify which files to exclude
exclude: [
'packages/core/src/error.ts', // Often excluded if it's just class definitions
'packages/core/src/index.ts', // No logic to test in the barrel file
'packages/core/src/types.ts', // No logic to test in type definitions
// Exclude test files from coverage report
'**/*.test.ts',
'packages/core/src/vite-env.d.ts',
'packages/core/src/primitives/lis.worker.ts',
],
// Set your desired coverage thresholds
thresholds: {
lines: 95,
functions: 95,
branches: 95,
statements: 95,
},
// Generate a text report in the console
reporter: ['text', 'json', 'json-summary', 'html'],
},
},
});