2 ms·
You know that when you have testable code because you started writing it in such way - you might not have to write all failure modes right away into your test s
by ozim 4y ago
You know that when you have testable code because you started writing it in such way - you might not have to write all failure modes right away into your test suit.
Then when things go wrong in a way you haven't thought and your test did not cover for it - you can easily add test to cover that case.
One of the workflows in testable code base is "find a bug" -> "write tests to cover the bug" -> "fix the bug" -> "tests passing" -> "your test suit now covers something that was actual bug and should not be ever again".