Test Generation
Generate tests that would have caught a real bug. Coverage percentage is not the goal.
Method
- Read the unit under test and list the behaviors: happy, empty, invalid, boundary, concurrent if it shares state.
- Prefer existing test helpers and fixtures. Match the repo's style exactly.
- Each test: arrange, act, assert one behavior. No giant "kitchen sink" cases.
- Include the error path with the exact error type/message the code promises.
- For I/O, freeze time, clock, and network. Do not hit live services.
Priorities
- Regression for a stated bug
- Boundary and invalid input
- Authz deny cases
- Idempotency / retry
- Snapshot UI only when layout is the contract
Delete any generated test that only restates the implementation line-for-line. If you cannot name the bug it would catch, drop it.