676c4beb60
拆分前端、后端与原生壳测试任务 接入server-rs workspace正式全量测试 将AI游戏创作分支及独立依赖纳入CI 修复既有测试断言、格式与异步稳定性问题 稳定AI Tauri并发回执测试 更新开发运维和共享流程文档
59 lines
2.0 KiB
TypeScript
59 lines
2.0 KiB
TypeScript
import path from 'node:path';
|
|
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
// Keep shared components' application-root imports resolvable in tests.
|
|
'@': path.resolve(__dirname, '.'),
|
|
// The AI shell has its own install for standalone Tauri builds. Keep root
|
|
// Vitest on a single React renderer even after that scoped install exists.
|
|
react: path.resolve(__dirname, 'node_modules/react'),
|
|
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
|
|
},
|
|
dedupe: ['react', 'react-dom', 'zustand'],
|
|
},
|
|
test: {
|
|
environment: 'node',
|
|
globals: true,
|
|
minThreads: 1,
|
|
maxThreads: 8,
|
|
server: {
|
|
deps: {
|
|
inline: [/apps\/ai-game-creator-shell\/node_modules\//],
|
|
},
|
|
},
|
|
include: [
|
|
'src/**/*.test.ts',
|
|
'src/**/*.test.tsx',
|
|
'apps/admin-web/src/**/*.test.ts',
|
|
'apps/admin-web/src/**/*.test.tsx',
|
|
'apps/ai-game-creator-shell/tests/**/*.test.ts',
|
|
'miniprogram/**/*.test.js',
|
|
'scripts/**/*.test.ts',
|
|
'packages/shared/src/**/*.test.ts',
|
|
'packages/shared/src/**/*.test.tsx',
|
|
],
|
|
exclude: [
|
|
'src/components/jump-hop-runtime/**',
|
|
'src/components/match3d-runtime/**',
|
|
'src/components/CustomWorldEntityEditorModal.test.tsx',
|
|
'src/components/CustomWorldResultView.test.tsx',
|
|
'src/components/child-motion-demo/**',
|
|
'src/components/custom-world-home/**',
|
|
'src/components/platform-entry/platformDialogStateModel.test.ts',
|
|
'src/components/puzzle-clear-creation/**',
|
|
'src/components/puzzle-runtime/**',
|
|
'src/components/rpg-entry/**',
|
|
'src/components/rpg-runtime-shell/**',
|
|
'src/components/unified-creation/workspaces/PuzzleCreationWorkspace.interaction.test.tsx',
|
|
'src/games/bark-battle/**',
|
|
'src/hooks/rpg-runtime-story/**',
|
|
'src/services/puzzle-clear/**',
|
|
'src/services/recommendedRuntimeGuestLaunch.test.ts',
|
|
'src/services/rpg-runtime/**',
|
|
],
|
|
},
|
|
});
|