Re:Show HN: I transformed my library into a Node and 100% co...
by nimnio on Friday March 11, 2016 @03:36PM
(#11269300)
"The advantage of unit testing modular code bases is that you don't have to test every program state, you just have to test every module state."
I don't think that's true with a capital T. Modules interact with each other. You can modularize, microize, or nanoize your application but the minimum subset of test-worthy states stays the same.
The advantage of unit testing modular code bases is that you don't have to test every program state, you just have to test every module state.
There is a huge difference in the feasibility of 100% code coverage if you need O(2^n) vs O(n) tests.
Even if your modules are highly coupled you should be able to mock away external dependencies and side-effects.