4 ms·
> The argument for isolating the units from each other is that it is easier to spot a potential bug. That's not the only argument. The important result of this
by Supermancho 2y ago
> The argument for isolating the units from each other is that it is easier to spot a potential bug.
That's not the only argument. The important result of this, is ensuring the "unit" of code is written to be testable. This happens to require it be simple and extensible. It does not enforce making the code or tests comprehensible.
When you don't trust someone's code, have them write detailed unit tests. They will find most of their problems on their own and learn better practices, along the way.
I am, in no way, implying that unit tests are a replacement for integration or behavioral or E2E testing et al...depending on how you want to define those.