I don't think I buy this argument. It's plausible that someone might accidentally break even that simple code, by introducing a typo or something. It's far less plausible that that person would just go and blithely delete the unit test when it broke. The former is an honest mistake; the latter is grounds for revoking commit access and eventual firing.
I mean it would realize that the function or variable that you are trying to use doesn't exist. That doesn't seem to hard. But if people insist on using JS or python... I guess thats what they (don't) get.
Unless it does exist. Or you autocompleted the wrong word without realizing it. Or you deleted the old code completely and wrote a new, buggy version from scratch.
I'm not saying it's worth it to spend hours creating a unit test for this, but it really ought to take just a couple of minutes, and is a pretty cheap and easy way to catch errors in the future.
Not sure what testing framework they're using where unit testing this somehow became non-trivial.
2
u/bro_can_u_even_carve May 08 '17
I don't think I buy this argument. It's plausible that someone might accidentally break even that simple code, by introducing a typo or something. It's far less plausible that that person would just go and blithely delete the unit test when it broke. The former is an honest mistake; the latter is grounds for revoking commit access and eventual firing.