4 ms·
The reason you _need_ tests is so that (a) when you change some code in the future it doesn't break any of your functionality without you knowing about it and (
by AndrewDucker 12y ago
The reason you _need_ tests is so that (a) when you change some code in the future it doesn't break any of your functionality without you knowing about it and (b) if someone else changes you code it doesn't break any of your functionality without you knowing about it.
If you don't believe that you need unit tests, you won't write them - so step one is persuading yourself that they're useful. So try to remember a time when you broke your code in an unexpected way, and then try to work out what kind of unit test would have helped avoid that.