diagnose-test
星标13
分支1
更新时间2026年5月27日 09:13
Debug a failing test by loading full context — test file, source file, error output
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
Debug a failing test by loading full context — test file, source file, error output
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Show all public exports from the vlist package to catch accidental API changes
Generate a changelog entry from recent commits since a given ref or tag
Find untested code paths and report coverage gaps in the vlist project
Run the full pre-release checklist — version, changelog, tests, types, build, size
| name | diagnose-test |
| description | Debug a failing test by loading full context — test file, source file, error output |
| argument-hint | <test-file-or-pattern> |
| allowed-tools | Bash(bun test *) Read Glob Grep |
Debug a failing vlist test with full context.
Run the failing test:
bun test $ARGUMENTS 2>&1If the test passes, report that and stop.
If it fails, gather context:
test/helpers/)Analyze the failure:
git log --oneline -10 -- <source-file> for recent changesOutput:
## Failing Test
**File:** test/plugins/async/plugin.test.ts
**Test:** "should cancel load when velocity exceeds threshold"
**Error:** Expected 0 but received 1
## Diagnosis
The test expects `loadAdapter.load` to not be called when velocity > LOAD_VELOCITY_THRESHOLD,
but the velocity check in src/features/async/feature.ts:87 uses `>=` instead of `>`.
## Suggested Fix
Change line 87 from `velocity >= threshold` to `velocity > threshold`,
or update the test to use a velocity strictly above the threshold.
Be specific — include line numbers, variable names, and exact values.