Files
opsxshell/vitest.config.ts
T

48 lines
970 B
TypeScript

/**
* Vitest Configuration - 测试框架配置
*/
import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import path from 'path'
export default defineConfig({
plugins: [
react(),
{
name: 'tauri-renderer-test',
// Native desktop commands are provided by test/setup.ts.
}
],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./test/setup.ts'],
include: ['test/**/*.{test,spec}.{ts,tsx}'],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: [
'node_modules/',
'dist/',
'test/setup.ts',
'**/*.d.ts'
],
thresholds: {
global: {
branches: 50,
functions: 50,
lines: 50,
statements: 50
}
}
}
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@shared': path.resolve(__dirname, './shared')
}
}
})