re: No excuses, write unit tests VIEW POST

re: I personally find that integration or end to end tests are more worthwhile.

Yes, my experience tell me the same. Unit test typically verifies single function. But if you follow good coding practices most of your functions will be small. And I find it that for 2/3 of functions it is easy to proof it works as expected. E.g. why would you bother writing unit test for smth. like this:

function testMe() {
if (a) {
return 1;
} else {
return 2;

So I only write unit tests for parts that are complex/not obvious. But that's definitely not 100% of code base.

It is better to invest time in Integration/End to End tests which save a lot of time on regression testing.

Code of Conduct Report abuse