3 ms·
Tests do not exist to prove correctness. Tests exist to help prevent you from changing behavior unknowingly.
by donw 6y ago
Tests do not exist to prove correctness.
Tests exist to help prevent you from changing behavior unknowingly.
- qayxc 6y agoI'd argue that tests can also be a tool for improving your architecture (e.g. separation of concerns) and for communicating intend and usage. Tests can be a tool for documenting expected behaviour, intended use, and edge cases. In contrast to written documentation, they have to be up-to-date by their very nature, which is an advantage over code comments or external docs.