The Purpose of TestsPeople argue over testing style, whether to use TDD or BDD, or whether tests are even useful at all. Before I get into how I structure my tests in Go, I should explain how I see tests. Tests should be 2 things: Self-containedEasily reproducibleThat’s it. They should be self-contained so that changing one part of your test suite doesn’t drastically affect another part. They shou
![Structuring Tests in Go](https://cdn-ak-scissors.b.st-hatena.com/image/square/4252f2d0f1779baee3f3576efe0dfd859682d470/height=288;version=1;width=512/https%3A%2F%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A1200%2F1%2ApH5CMaeBHiQwTPeJHPYW7w.jpeg)