test: 新增 8 个测试文件 63 用例 + 覆盖率设施,行覆盖 42.58%→48.24%
- 新增 jsp-extractor/report/method-extractor/fix-prompt/registry/provider-chat/import-service/yaml-parser 测试 - .vscode-test.mjs 加 srcDir+coverage,package.json 加 test:coverage,产出 tests/coverage/(html) - 修复 method-extractor java fallback 取错捕获组、mockDocument.getText 忽略 range - 更新 tests/test-cases.md(24 文件 179 条)与 test-execution-log.md(覆盖率记录)
This commit is contained in:
@@ -40,3 +40,20 @@ npm run compile # tsc 主工程
|
||||
npm run compile:test # tsc 测试工程(out/tests)
|
||||
npm test # @vscode/test-cli 运行 out/tests/**/*.test.js
|
||||
```
|
||||
|
||||
## 五、覆盖率执行记录(2026-08-27)
|
||||
|
||||
| 项目 | 内容 |
|
||||
|---|---|
|
||||
| 执行日期 | 2026-08-27 |
|
||||
| 测试命令 | `npm run test:coverage`(compile → compile:test → `vscode-test --coverage --coverage-output tests/coverage`) |
|
||||
| 测试文件数 | 24 个 `*.test.ts` |
|
||||
| 通过(passing) | **179** |
|
||||
| 失败(failing) | 0 |
|
||||
| 行/语句覆盖率 | **48.24%**(5570/11546) |
|
||||
| 分支覆盖率 | 77.97%(524/672) |
|
||||
| 函数覆盖率 | 43.66%(155/355) |
|
||||
| 覆盖率报告 | `tests/coverage/index.html`(仅统计测试实际触达模块) |
|
||||
| 新增覆盖模块 | jsp-extractor、report、method-extractor、fix-prompt、registry、ai/providers(三协议)、import-service、yaml-parser |
|
||||
|
||||
> 覆盖率基线:2026-08-27 首跑 116 passing / 42.58% → 补测 63 条后 179 passing / 48.24%。
|
||||
|
||||
Reference in New Issue
Block a user