Files
short-drama-agent-front/vitest.config.ts
T

18 lines
771 B
TypeScript

import { fileURLToPath, URL } from 'node:url'
import { configDefaults, defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
/** 使用轻量 DOM 测试 API、异步状态和 Vue 页面行为。 */
export default defineConfig({
plugins: [vue()],
resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } },
test: {
environment: 'happy-dom',
restoreMocks: true,
/** 只收集正式测试目录,避免把包管理缓存中的旧项目快照作为当前测试。 */
include: ['tests/**/*.test.ts'],
/** 只检查当前 checkout,避免收集其它隔离 worktree 中的重复测试。 */
exclude: [...configDefaults.exclude, '**/.worktrees/**', '**/.worktree/**']
}
})