Andrew's Digital Garden

Good code is testable code

I often struggle with telling people how to write better tests, and it's usually because tests and code are so interlinked. You can only write good tests if you have good code, and good code makes writing tests easy.

The question is then "what is testable code?", but that's a bit tricky. Because there's so many things. Some examples:

[[20221010033955-single-responsibility-principle]] [[20220801022400-explicit-dependencies-principle]] [[20210202103254-coupling-cohesion]] #todo - add more

[[testing]]

Good code is testable code