DEV Community

Discussion on: Are old unit tests useful?

Collapse
 
stegriff profile image
Ste Griffiths

I think that - as you've alluded - properly written tests should document a feature, so that as you read the test, you understand the 'what' and the 'why' of the system's behaviour.

Then, as you write new features, those tests are stopping you from breaking old features and regressing old bugfixes.

If the tests aren't doing that, they're perhaps not great tests!

Of your premises 1 and 2, I disagree with 1! I trust my colleagues tests; the effort I have to put in to reading and understanding them is worth it.

Of your outcomes a, b, and c, I've got a feeling b and c are true ;)

This is a thought-provoking post! Thanks for keeping us thinking :)