drobins25/craft / skills/test-fix
test-fix
VerifiedThis skill should be used when validate-chunk reports test failures specifically, when the user says "tests are failing", "figure out what's wrong with the tests", "fix the failing tests", or when test assertions don't match expected output after chunk implementation. Triages whether the test or the implementation is wrong and fixes the correct one.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.4 KB |
| references/scenario-catalog.md | markdown | 1.3 KB |
references/scenario-catalog.md
View on GitHub# Test Fix Scenario Catalog
Worked examples of common test triage outcomes. Reference these when determining if the test or the implementation is wrong.
---
## Stale Assertion (most common)
Chunk changed a function's return value. Test asserts old value.
```diff
- expect(getStatus()).toBe('pending')
+ expect(getStatus()).toBe('active')
```
## Renamed/Moved Export
Chunk refactored an export name. Test imports old name.
```diff
- import { oldName } from './module'
+ import { newName } from './module'
```
## Changed Component Props
Chunk added a required prop. Test renders without it.
```diff
- render(<Component />)
+ render(<Component requiredProp="value" />)
```
## Changed API Response Shape
Chunk updated an API endpoint's response format. Test mocks old shape.
```diff
- mockResponse({ data: items })
+ mockResponse({ items, total: items.length })
```
## New Validation Added
Chunk added input validation. Test submits data that's now invalid.
```diff
- const input = { name: '' } // was valid, now rejected
+ const input = { name: 'Test User' } // passes new validation
```
## Side-Effect Behavior Change
Chunk changed Component A, but Component B's test fails because B depends on A.
- Read Component B's test to understand the dependency
- Check if the dependency change was intentional
- Update B's test mocks to reflect A's new behavior
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |