Hacker News new | ask | show | jobs
by heifer2822 3281 days ago
It's TDD. Just because the whole app wasn't developed with TDD doesn't mean you can't test drive a bug fix.

There's a bug, you write a test, "this bug shouldn't exist", that test currently fails, then you write just enough code to fix the test, then refactor. That's TDD.

1 comments

Exactly what I was thinking. The test ends up being written firs this case, before you write/edit the code to fix the bug. So it falls under strict definition of TDD.