mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
chore: update test directions in AGENTS.md (#22490)
Our `AGENTS.md` previously contained this directive: > When adding tests for new behavior, add new test cases instead of modifying existing ones. This preserves coverage for the original behavior and makes it clear what the new test covers. This leads to inflated diffs and test explosions. Updating it to bias more towards updating existing tests where applicable. --------- Co-authored-by: Danielle Maywood <danielle@themaywoods.com> Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
This commit is contained in:
@@ -198,9 +198,7 @@ reviewer time and clutters the diff.
|
||||
**Don't delete existing comments** that explain non-obvious behavior. These
|
||||
comments preserve important context about why code works a certain way.
|
||||
|
||||
**When adding tests for new behavior**, add new test cases instead of modifying
|
||||
existing ones. This preserves coverage for the original behavior and makes it
|
||||
clear what the new test covers.
|
||||
**When adding tests for new behavior**, read existing tests first to understand what's covered. Add new cases for uncovered behavior. Edit existing tests as needed, but don't change what they verify.
|
||||
|
||||
## Detailed Development Guides
|
||||
|
||||
|
||||
Reference in New Issue
Block a user