TDD in the Age of AI: Who Tests the Tests?
I use Codex and Pi daily. They write code faster than I can read it. Lines appear on my screen in seconds that would have taken me twenty minutes to type.
TDD, domain modelling, and the boundaries that make code safer to change.
8 published entries
These series give this subject an intentional reading order.
A path through tests, boundaries, and the design decisions that make code safer to change.
See the 8-part reading order →I use Codex and Pi daily. They write code faster than I can read it. Lines appear on my screen in seconds that would have taken me twenty minutes to type.
Every production Node app has seen an Unhandled Exception crash the process. If exceptions are so great, why does every function have an invisible contract that says “I might throw, good luck figuring out what”?
I once spent three hours debugging a test that was 80% mock setup.
The previous articles — Value Objects & Entities and Aggregates & Repositories in TypeScript in particular — made a few choices without naming them: Order owns its lines, only OrderRepository persists them, and a customer appears in an order as an ID rather than as a loaded object.
The earlier Aggregates & Repositories article deliberately kept persistence small. This article builds on its Order, Result, and snapshot examples to handle two requests changing the same aggregate.
Last time, in Value Objects & Entities - Building Blocks That Can’t Break, we made invalid states impossible for a single User. Email validates itself. Age validates itself. The User entity composes them and manages identity.
Last time, I showed you how TDD gives you permission to refactor. But there’s a problem I glossed over: what happens when the same validation rule appears in five different places?
Three years ago, I had a crisis of confidence with test-driven development.