import { defineConfig } from 'vitest/config' import vue from '@vitejs/plugin-vue' import { resolve } from 'path' export default defineConfig({ plugins: [vue()], resolve: { alias: { '@': resolve(__dirname, 'src'), }, }, test: { globals: true, environment: 'jsdom', include: ['tests/cases/*.test.ts'], exclude: ['tests/cases/*.test.js', 'tests/*.js'], setupFiles: ['tests/setup.ts'], // 每个测试文件独立上下文 fileParallelism: true, // CSS 导入支持 css: true, }, })