From e50332bfff248eddeae7f41084ead3e65793823f Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Sat, 26 Sep 2026 00:30:27 +0000 Subject: [PATCH] rephrase the test bar for clarity --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index a28ec197..2d30c558 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -28,7 +28,7 @@ Everything comes from the Nix flake devshell; do not install toolchains by hand. - `app/src/test` - JVM unit tests (JUnit4, Robolectric, Roborazzi, MockWebServer). Run by `:app:testDebugUnitTest`. - `app/src/integrationTest` - tests that need real servers. Compiled with the unit test sources but run by the dedicated `:app:integrationTest` task, and excluded from every `*UnitTest` task. The nushell harness starts the servers for you. -- A test is only worth having if it passes for the right reason *and* fails when the behaviour breaks. There is no such thing as a documentation test: one that passes now but would not fail if the thing stopped working is actively harmful, because it hides the gap it pretends to cover. Before keeping a new test, break the behaviour (or run it against the pre-fix code) and confirm it fails, then confirm it passes again with the fix. +- A test earns its place only if it fails when the behaviour it covers breaks, and passes when the behaviour works. A test that passes either way is worse than no test: it looks like coverage while hiding the gap. So when you add one, break the behaviour (or run the test against the pre-fix code), watch it fail, then restore the fix and watch it pass. ## CI