3 ms·
I agree that integration tests are more important, but a lot of components (particularly anything mathematical or with a functional design) benefits hugely from
by snovv_crash 4y ago
I agree that integration tests are more important, but a lot of components (particularly anything mathematical or with a functional design) benefits hugely from unit tests.
For example, checking that your backoff works correctly in the case of dropped packets is really hard to do at a higher level, because that part of your API isn't exposed publicly but is still critical to the correct function in degraded environments.
The people who insist on unit tests for 1-line functions are crazy and dogmatic though, I agree. But if a large fraction of your codebase is 1-line functions I'd also argue your architecture is crap. A codebase where effective unit testing is useless or difficult is a distinct smell.