logoalt Hacker News

closeparenlast Tuesday at 11:21 PM2 repliesview on HN

90% of working professionally in Go is contriving test cases to achieve statement coverage over each error return branch, something no one would ever do in a language with exceptions.


Replies

cedwslast Wednesday at 12:36 AM

Test coverage as a target metric is stupid.

show 3 replies
ncruceslast Wednesday at 8:58 AM

It this really bothers you, convince your team to use courtney and focus on the more relevant error branches: the ones where (1) a novel error value is produced or (2) handled rather than those that simply bubble it up.

https://github.com/dave/courtney