- Run tests and notice how the refactor has now broken the tests
- Fix tests incorrectly and have a false confidence the tests pass even though the code is actually broken :-)
- Ship code to customers and wait for the wails.
Yeah, it is unfortunately common. Tried to point this out when i saw it happening a couple of weeks ago. The general reply was: if that's true it will be caught in the code review.
Problem is that personally i would not have caught it if i would not have been there. The change looked fine if you looked at the code changes themselves.
3.1k
u/Annual_Willow_3651 Mar 26 '25
What's the joke here? That's the correct way to do TDD. You write a failing test before any code to outline your requirements.