|
|
@@ -16,4 +16,11 @@
|
|
|
- e2e测试失败时先查看页面结构 test-results/**/error-context.md
|
|
|
- 前端是 hono/client hc rpc 的,不是直接fetch
|
|
|
- bmad-core dir is in .bmad-core
|
|
|
-- 必须用中文回答
|
|
|
+- 必须用中文回答
|
|
|
+- **git提交**: 当遇到git锁文件冲突时,使用单条命令:`rm -f /mnt/code/184-172-template-6/.git/index.lock && git add <文件> && git commit -m "提交信息"`
|
|
|
+- **测试调试**: 使用 `pnpm test --testNamePattern "测试名称"` 来运行特定测试查看详细信息 (mini使用Jest,其他包使用Vitest)
|
|
|
+ - **Vitest**: 支持 `-t` 或 `--testNamePattern`
|
|
|
+ - **Jest**: 只支持 `--testNamePattern`,mini是Jest
|
|
|
+ - **Mini测试**: 需要先进入mini目录再运行 `pnpm test --testNamePattern "测试名称"`
|
|
|
+- **表单调试**: 表单提交失败时,在表单form onsubmit=form.handleSubmit的第二个参数中加console.debug来看表单验证错误,例如:`form.handleSubmit(handleSubmit, (errors) => console.debug('表单验证错误:', errors))`
|
|
|
+- 类型检查 可以用 pnpm typecheck 加 grep来过滤要检查的 指定文件
|