Design for testability
blog.nelhage.com
blog.nelhage.com
If you do that, the only thing you'll get is code that is easy to run tests on. If you get somewhat good and composable code out of that, that's only a vaguely related byproduct, and only because good code is usually easy to run tests on, not the other way around.
Testability is by no means substitute for good architecture and thought-out interfaces.