-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvitest.config.ts
More file actions
27 lines (26 loc) · 858 Bytes
/
vitest.config.ts
File metadata and controls
27 lines (26 loc) · 858 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
import { defineConfig } from 'vitest/config'
import path from 'node:path'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
test: {
environment: 'node',
include: ['src/**/*.test.ts', 'src/**/*.test.tsx'],
exclude: ['src/test/e2e/**'],
server: {
deps: {
// Inline so Vite bundles it and resolves JSON imports (Node ESM requires import attribute for JSON)
inline: ['@actions/workflow-parser'],
},
},
coverage: {
provider: 'v8',
reporter: ['text', 'text-summary', 'html', 'json-summary', 'lcov'],
include: ['src/lib/**/*.ts', 'src/types/**/*.ts'],
exclude: ['src/**/*.test.ts', 'src/**/*.test.tsx', 'src/main.tsx', 'src/App.tsx', 'src/vite-env.d.ts'],
},
},
resolve: {
alias: { '@': path.resolve(__dirname, './src') },
},
})