Skip to content

Comment on Go Testing by Example [video]parent

Comments

Testing should help you accomplish two things: find bugs and allow confident refactoring. These do neither.

Technically the primary goal of testing is to document for other developers (and future you) how something is intended to be used. The documentation being self-verifying most definitely helps with refactoring and may discover bugs, but those are largely incidental.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.