mirror of
https://github.com/obra/superpowers.git
synced 2026-07-10 03:59:04 +08:00
fix(skills): broaden writing-good-tests trigger to any test writing
The pointer fired only on adding mocks or test utilities; the doc's own load-when line already says writing or changing tests. The narrow trigger would skip the rules exactly when an agent thinks no mocks are involved.
This commit is contained in:
@@ -203,7 +203,7 @@ Next failing test for next feature.
|
|||||||
| **Clear** | Name describes behavior | `test('test1')` |
|
| **Clear** | Name describes behavior | `test('test1')` |
|
||||||
| **Shows intent** | Demonstrates desired API | Obscures what code should do |
|
| **Shows intent** | Demonstrates desired API | Obscures what code should do |
|
||||||
|
|
||||||
When adding mocks or test utilities, read [writing-good-tests.md](writing-good-tests.md) for the rules that keep tests honest:
|
When writing or changing any test, read [writing-good-tests.md](writing-good-tests.md) for the rules that keep tests honest:
|
||||||
- Assert on real behavior, never on mock behavior
|
- Assert on real behavior, never on mock behavior
|
||||||
- Keep test-only code in test utilities, out of production classes
|
- Keep test-only code in test utilities, out of production classes
|
||||||
- Understand a dependency's side effects before mocking it
|
- Understand a dependency's side effects before mocking it
|
||||||
|
|||||||
Reference in New Issue
Block a user