-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
25 lines (23 loc) · 714 Bytes
/
vitest.config.ts
File metadata and controls
25 lines (23 loc) · 714 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
/// <reference types="vitest" />
import path from 'node:path'
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
globals: true, // Use global variables
environment: 'jsdom', // Use jsdom as the test environment
setupFiles: './vitest.setup.ts', // Load the setup file
include: ['src/**/*.test.{ts,tsx}'], // Include test files
coverage: {
provider: 'v8', // Use V8 coverage
reporter: ['text', 'lcov'], // Output text and lcov reports
include: ['src'], // Include source code only
exclude: [
'src/__tests__',
'**/index.ts',
],
},
alias: {
'@': path.resolve('./src'), // Alias @ to src
},
},
})