4 ms·
I think one of the major advantages of writing testable code is that you get better code and architecture for free. You end up with less stateful code, more pur
by AtNightWeCode 6y ago
I think one of the major advantages of writing testable code is that you get better code and architecture for free. You end up with less stateful code, more pure functions, more clear dependencies, fewer hard coded things, flows that are understandable for humans and so on.
If a solution is so complex that writing a complete test for it is hard then the solution is probably not very good and the next coder will not enjoy debugging it.
For UX for instance I agree that automated tests are not that valuable.
- rualca 6y ago> I think one of the major advantages of writing testable code is that you get better code and architecture for free. This. Untestable code tends to be so tightly coupled that's practically impossible to isolate subcomponents or even pure function bits. Being untestable is synonymous to being unmaintainable. Complaining about the hassle of creating unit tests is a red flag about the overall state of the whole project.