Anon Archived Does Voat not unit test or is it just not included in the GitHub repo? (github.com)
submitted ago by 225485?
Posted by: 225485?
Posting time: 5.4 years ago on
Last edit time: never edited.
Archived on: 2/12/2017 1:51:00 AM
Views: 991
SCP: 19
20 upvotes, 1 downvotes (95% upvoted it)
Anon Archived Does Voat not unit test or is it just not included in the GitHub repo? (github.com)
submitted ago by 225485?
view the rest of the comments →
[–] TheGuyWithFace 0 points 4 points 4 points (+4|-0) ago
While in certain applications I might agree with you, for a full-featured website like voat I just have to disagree with you. Unit tests can be annoying to write, and their benefit might not be super apparent at first, but in the long run, well written tests are very very valuable IMO.
[–] justletmevoat 2 points 1 point 3 points (+3|-2) ago
They break stupidly when code changes, and people defend them saying "Oh, well, good unit tests don't do that", and then these good unit tests never exist, and you've got to stub or mock everything, so your tests don't test any fucking thing useful, and then the API for the DB library changes or you have to update versions and you have not only update your tests to that, but also the fucking stubs.
Fuck unit tests - out of all the different kinds of testing possible it is the most useless.
[–] kherrera 0 points 1 point 1 point (+1|-0) ago
I agree with how time consuming and complicated it can be, but I disagree that it is useless.
If a unit test breaks and you know about it, then it did its job. Expectations have been changed and the error you see as a result of a failed test is a heads up. Depending on the type of project that is being developed, it is very useful in order to re-evaluate the changes that were made, or to update related processes. It's an excellent way to find regressions before they are pushed to production.
I personally find it tedious to write tests, but I appreciate the piece of mind I get even more after running the tests and getting back a clean result. Some would argue that a clean result doesn't really mean anything, but in practice it comes down to how well the tests were written.
[–] taxation_is_slavery 0 points 1 point 1 point (+1|-0) ago (edited ago)
If you're paid by the hour they are wonderful wastes of time. Though I prefer more interesting things, if you hate the company you're doing work for it's one option.
[–] TheGuyWithFace 0 points 1 point 1 point (+1|-0) ago (edited ago)
But they very much do exist. It takes a fair amount of forethought - you have to design your system ahead of time to be modular and think about these things as you go, but good, non-brittle unit tests absolutely exist. If you're having to mock everything every time you write a unit test, that's probably a sign your code could use some refactoring.
[–] theonlylawislove ago
It sounds as if you do not know how to unit test.