Commit Graph

4 Commits

Author SHA1 Message Date
Jason
bbf830a1da test: add frontend testing infrastructure with vitest
- Introduce Vitest + React Testing Library + jsdom environment
- Add useDragSort hook unit tests covering:
  * Sorting logic (sortIndex → createdAt → name)
  * Successful drag operation (API call + cache invalidation)
  * Failed drag operation (error toast display)
  * Edge case (no valid target, no API call)
- Configure global test setup (i18n mock, auto cleanup)
- Update TypeScript configs to include tests/ directory
- Add test development plan documentation

Test Coverage:
  ✓ Provider drag-and-drop sorting core logic
  ✓ React Query cache refresh
  ✓ Toast notification display
  ✓ Boundary condition handling

Test Results: 4/4 passed (671ms)
Next Steps: Sprint 2 - component tests with MSW mock layer
2025-10-25 10:08:06 +08:00
Jason
cc0b7053aa feat: complete stage 1 infrastructure 2025-10-16 10:00:22 +08:00
Jason
55c62a3753 - fix(types): 统一导入到 src/types.ts,移除 shared/types 残留路径
- chore(tsconfig): 将 include 扩展为 src/**/* 覆盖迁移后的源文件
- feat(build): Vite 设置 root 为 src,并将 build.outDir 设为 ../dist 以匹配 Tauri frontendDist
- refactor(api): 去除未使用的 plugin-shell import;统一 electronAPI 类型定义至 vite-env.d.ts
- build: 验证 renderer 构建通过,产物输出至 dist/
2025-08-23 23:11:39 +08:00
farion1231
e0a9c1ab4c initial commit 2025-08-04 22:16:26 +08:00