import { defineConfig } from 'vitest/config'; import path from 'path'; export default defineConfig({ resolve: { alias: { '@': path.resolve(__dirname, './'), }, }, test: { globals: true, environment: 'node', coverage: { provider: 'v8', reporter: ['text', 'json', 'html'], exclude: [ 'node_modules/', 'dist/', '**/*.config.js', '**/*.config.ts', '**/*.d.ts', '**/index.ts', '**/*.test.ts', '**/*.spec.ts', 'test/**', // 排除整个test目录 ], thresholds: { global: { branches: 80, functions: 80, lines: 80, statements: 80, }, }, }, }, });