3 ms·
> " If you can't test your code easily, then your code is awful. End of story." I don't think this is trolling. Maybe I would have phrased it in a nicer way, b
by breck 6y ago
> " If you can't test your code easily, then your code is awful. End of story."
I don't think this is trolling. Maybe I would have phrased it in a nicer way, but I agree with their math.
Now I don't think you need to get to 100%, but if you can't easily see how you could get to 100%, that's a problem.
- postalrat 6y agoHow easy is it test a function add(a, b) that just adds a and b and returns the result? Or how bout testing: function divide(a, b, fn) { let [_a, _b] = fn(a, b); return _a / _b; }