I've recently joined a seed stage startup, founded by xooglers. I like most of the things, but some requirements on the code are driving me nuts from time to time. I understand the importance of unit tests. However, when suddenly there is a deadline in less than 48 hours (happens in startups, lol), you shouldn't be blocked by the requirement of designing unit tests, I think. Good tests take a noticeable chunk of precious time, right before the deadline everyone's ass is on fire, and unit tests is the last thing you want to worry about... Also, things can change so fast in a startup, that the code you worked on two weeks ago can become irrelevant. What's the point of enforcing strict policy of blocking changes without unit tests then? I'd create a lower priority ticket so that I don't forget to add a unit test a little bit later, if the code actually sticks and not thrown out of the window. TC: $240k cash + stock options
Tests or gtfo
Lol, even if it means your company misses a deadline?
Missing deadlines because of unit tests reveals many things
It’s definitely not a must for Frontend. Visual regression tests are way more valuable.
It's definitely a must for FrontEnd.
How so ? React rendering shouldn’t have much logic to begin with. If you have a data layer I can understand unit tests being more valuable in that area. Same for BFF, unit tests make sense. This is all assuming work is at a fast paced high growth startup / company.
The worst is integration test that take 2+ minutes to setup and dont run consistetnly on laptops
Let’s be honest if you write a ticket to do it later it’s never going to get done…
Love TDD but if you guarantee the code works, no test needed.
“if it will be added later” Lolol
Check book “pragmatic programmer”
Units tests are good but people sometimes go overboard with useless tests. End to end tests are much more critical
End to end tests are pretty much the worst. You’re testing everything and nothing at the same time usually in the very slow fashion
+1 end to end tests are the only thing that really matters Unit tests if you define “unit” as basically all of the code together except mocked network calls can also be very valuable, because it’s basically a fast and reliable end to end test if your assumptions about external components are good Class-level everything else mocked unit tests? Usually a waste of time. Exception may be testing error handling code that otherwise won’t get hit.
For non-frontend writing tests makes you write the code quicker in almost all cases if you are a decent dev
Tech Industry
Yesterday
1203
😞 Girlfriend help! 😞
Tech Industry
2d
9302
China CYBERATTACK on UK ? WTF
World Conflicts
Yesterday
175
$26 bn for death of Palestinians!
Tech Industry
Yesterday
3049
I took a stand and got terminated lol
Tech Industry
Yesterday
2047
How can my idiot brother who does real estate afford this
Nah. It's a must regardless.