docs(studio): .agent 记单测门——npm test(vitest)+ bridge tsx 测

新增测试栈后补验证门:单测=npm test(vitest,src/**/*.spec.ts,U6 已立);bridge 安全测试走 node --import tsx --test。新增逻辑须带 spec。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
lili 2026-06-17 16:37:25 -07:00
parent b6c1d4a02c
commit 644b95a3c9

View File

@ -43,4 +43,5 @@ game-studio/
## 验证门铁律(本仓特有,勿踩)
- **`vue-tsc --noEmit` 在本仓恒退 0 = 假门禁**(根 tsconfig files:[])。类型检查权威 = `npm run build`(含 `vue-tsc -b`)。
- **单测 = `npm test`vitest`src/**/*.spec.ts`**U6 已立 store/Create 测;新增 store/组件逻辑须带 spec(vi.mock 隔离 api/router)。另 `src/host/bridge.security.test.mts` 走 `node --import tsx --test``.mts` 不入构建,见文件头)。
- mock 数据严格贴契约 YAML发现缺口上报 contractGaps、**不私造契约**。