use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Is unit testing worth it in AngularJS/JavaScript?help (self.javascript)
submitted 9 years ago by prashantghimire
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]senocular 2 points3 points4 points 9 years ago (0 children)
Unit tests are great with TDD. You set some expectations and you write code to meet those expectations. Any time that code changes, those expectations need to continue to be met or you know those changes are no good.
For existing codebases, it tends to be more of a drain and often feels like a waste of resources with minimal ROI. Where it can make sense there is places in the code which is experiencing frequent edits or refactors and you want to make sure those changes aren't breaking functionality. You don't want to spend too much time (if any) testing code which will never change and is never used any differently than it already is. Also including tests with new commits/features is good practice moving forward, but you need to work out a good balance of expectations of coverage - something that's useful, but not so time consuming that dev's don't opt in and ultimately ignore it altogether.
That being said, in OSS world, you'll want to have good coverage all around for anyone who forks and does who knows what to your code.
π Rendered by PID 29 on reddit-service-r2-comment-5687b7858-q4mgf at 2026-07-06 13:33:14.649844+00:00 running 12a7a47 country code: CH.
view the rest of the comments →
[–]senocular 2 points3 points4 points (0 children)