§ GARDEN · TESTING · CLASS OPEN
NODE FILE · ENTRY
A Testing Philosophy That Ships
FILED UNDER · TESTING
①Read
②Meta
The testing trophy, confidence-driven testing, and why 100% coverage is the wrong goal.
Tests exist to give you confidence that your code works. Not confidence that every line executes — confidence that users can do what they need to do. This reframing changes everything: instead of asking 'what's our coverage?' you ask 'what breaks if this test doesn't exist?'
The Testing Trophy
Kent C. Dodds' testing trophy inverts the traditional pyramid: integration tests give you the most confidence per line of test code. They test real interactions between modules without the brittleness of end-to-end tests or the false confidence of heavily mocked unit tests. Write mostly integration tests, fewer unit tests, and just enough E2E to cover critical user flows.
DTNRWORKSHOP ARMAMENTSSN 2012.OTT.0176