
sswandClaude
da7f2639b0
refactor(tests): 移到 dacli/tests/integration/audit/ + 业务起源说明 docs/dos
用户反馈 2026-07-07: 测试文件放 dacli/ 根目录混淆, 应区分业务/通用.
- 业务特定 (dos 26 P0 漏洞) → docs/dos
- 通用 dacli 能力 → dacli/tests/
之前: dacli/test_audit_bs66_70.ts + test_audit_bs71_74.ts (放根目录)
现在: dacli/tests/integration/audit/ (与现有 unit/integration/e2e 结构匹配)
- bs66-70-audit-enhance.test.ts (BS-新66~70 audit 增强, 5/5 mock)
- bs71-74-endpoint-fix.test.ts (BS-新71~74 端点修复, 5/5 端点/源码)
import 路径修复: './src/...' → '../../../src/...' (3 层目录深度)
docs/dos/plan.md §12 加业务起源引用:
- 业务起源 (为什么有这些盲点): docs/dos/debug.md §5
- 通用测试 (dacli audit + 字段提取 + cascade): dacli/tests/integration/audit/
- 命名约定: bs<num>-<desc>.test.ts (BS 编号 + 描述, vitest 识别 .test.ts 后缀)
测试验证 (测试文件位置调整后):
npx tsx tests/integration/audit/bs66-70-audit-enhance.test.ts → 5/5 PASS
npx tsx tests/integration/audit/bs71-74-endpoint-fix.test.ts → 5/5 PASS
Co-Authored-By: Claude <[email protected]>