DEV Community

Discussion on: My experience trying TDD for the first time in Go

Collapse
 
lonlilokli profile image
Lonli-Lokli

I like TDD also because of edge cases, because with them you don't focus on feature details, you just iterate over all possible inputs and verifying that all possible outputs are correctly handled. It's very common to forget some rare case, that's why I often create test with failure inside, describing what case should be verified after implementation (usually it's because it's not known what services should be mocked).

Collapse
 
bethanyj28 profile image
Bethany

That's such a good idea!