3 ms·
Unit tests often double as documentation. They show the expected behavior of a function. And if you take the time to write a series of high level cases, they
by bb88 2y ago
Unit tests often double as documentation. They show the expected behavior of a function.
And if you take the time to write a series of high level cases, they can show the full expected behavior of a process. E.g: "Don't accept another request on the same object while we have another request on that object in the queue."
A unit test is great, but I've seen people delete unit tests rather than try to understand what's going on.