-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
27 lines (26 loc) · 938 Bytes
/
vitest.config.ts
File metadata and controls
27 lines (26 loc) · 938 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
// vitest.config.ts
import { resolve } from 'path';
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'node', // Use Node environment for server-side code
include: ['**/test/**/*.spec.ts'], // You can adjust the test folder structure as needed
coverage: {
provider: 'v8', // Use c8 for coverage tracking
reporter: ['text', 'html'], // Generate both text and HTML reports
all: true, // Tracks coverage for all files, even if not directly tested
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/mocks/**',
'**/ConduitObserver.ts',
'.prettierrc.mjs',
'eslint.config.mjs',
'vitest.config.ts',
], // Exclude unnecessary files
},
setupFiles: [resolve(__dirname, 'vitest.setup.ts')], // Global setup path
watch: true, // Enable test rerun on file changes
},
});