2 ms·
The take-home here is: Unit-test your failure states as well, people. Not just your happy paths! I mean, this problem was a result of MULTIPLE untested failure
by pmarreck 11y ago
The take-home here is: Unit-test your failure states as well, people. Not just your happy paths!
I mean, this problem was a result of MULTIPLE untested failure states.
And yes, it IS possible to unit-test this sort of thing. You can fake out network connections and responses. I haven't yet found something that's impossible to unit-test, if you just think about how to do it properly, actually.
EDIT: Why downvotes without a typewritten rebuttal? That's just not what I expect from HN (as opposed to, say, Reddit)