Skip to content

Commit be57d23

Browse files
Update test instructions for agents (#131)
1 parent 28a13b7 commit be57d23

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.claude/skills/review-pr/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Go through each changed file and check for violations. Flag only actual problems
5959
### Testing
6060

6161
- [ ] New functionality has tests (prefer integration tests)
62+
- [ ] Bug fixes have an integration test that reproduces the bug (fails before fix, passes after)
6263
- [ ] Interactive tests use PTY (`github.com/creack/pty`)
6364
- [ ] No unchecked errors outside of test files
6465

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Environment variables:
7171
# Testing
7272

7373
- Prefer integration tests to cover most cases. Use unit tests when integration tests are not practical.
74+
- **When fixing a bug, always add an integration test** that fails before the fix and passes after. This prevents regressions and documents the exact scenario that was broken.
7475
- Integration tests that run the CLI binary with Bubble Tea must use a PTY (`github.com/creack/pty`) since Bubble Tea requires a terminal. Use `pty.Start(cmd)` instead of `cmd.CombinedOutput()`, read output with `io.Copy()`, and send keystrokes by writing to the PTY (e.g., `ptmx.Write([]byte("\r"))` for Enter).
7576

7677
# Output Routing and Events

0 commit comments

Comments
 (0)