2 ms·
My favorite example of "things that are better left untested" so far is a method that returned a hard-coded array and a test which checked whether the method re
by rob74 7y ago
My favorite example of "things that are better left untested" so far is a method that returned a hard-coded array and a test which checked whether the method really did return that hard-coded array. So, if you wanted to add something to that array, you now had to add it in two places. Sure, that's an easy way to increase test coverage, but maybe you should focus on areas where unit testing makes more sense first?