4 ms·
The differences are magnified when arbitrary test coverage metrics are imposed. The first example is easier to write tests for because all the conditionals are
by 0x445442 3y ago
The differences are magnified when arbitrary test coverage metrics are imposed. The first example is easier to write tests for because all the conditionals are easier to scan. The second, green, example requires the test writer to follow multiple stack frames to write the test unless there’s some mocking and spying framework at hand.