修复(项目): 优化动态导入和测试配置

- 移除ImageCanvas和HistoryPanel中不必要的useAppStore动态导入
- 添加缺失的Jest测试依赖(jest, ts-jest, jest-environment-jsdom, identity-obj-proxy)
- 修复ImageCanvas测试中的React引用问题和forwardRef支持
- 清理因移除动态导入导致的语法错误
- 优化代码结构,提高构建性能

验证:
- 构建成功通过
- 所有5个测试套件通过(34个测试)
- TypeScript类型检查无错误
This commit is contained in:
2025-12-22 21:12:40 +08:00
parent 206dfbf12d
commit 8d31b98736
6 changed files with 3976 additions and 494 deletions

View File

@@ -57,8 +57,12 @@
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.11",
"globals": "^15.9.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^30.2.0",
"jest-environment-jsdom": "^30.2.0",
"postcss": "^8.5.6",
"tailwindcss": "^3.4.15",
"ts-jest": "^29.4.6",
"typescript": "^5.5.3",
"typescript-eslint": "^8.3.0",
"vite": "^5.4.2"