Answer prose round 2: 0 🔴, 0 🟡; fix item 165's figures, say what a test does with the clock and randomness, and state why a reviewer cannot catch a copied value
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
- One behaviour per test, named for it, tested once, at the lowest level that reproduces it. No loops or branches in a test body; parametrize the cases.
|
||||
- Every escaped bug becomes a test that fails without its fix.
|
||||
- Write no test that no real bug could fail: a constant's value, a list's length, the framework's own behaviour.
|
||||
- No sleeps or wall-clock asserts in a test, and seeded randomness.
|
||||
- A test neither sleeps nor asserts on the wall clock, and seeds any randomness.
|
||||
- For pure logic over many inputs, prefer a property test: a round trip, an invariant.
|
||||
- Changing tests and changing other code are two separate processes — be very careful about doing both at once.
|
||||
- Use properly randomised UUID v7s — never `aaaa-0000`-style placeholders.
|
||||
|
||||
Reference in New Issue
Block a user