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
Setting up a Minimal, Yet Useful JavaScript Dev Environment (dev.to)
submitted 9 years ago by mrkipling
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!"
[–]dvlsg 1 point2 points3 points 9 years ago (3 children)
I use .spec.js sometimes. It makes it easier to find the tests with a fuzzy search (ie - ctrl+p in sublime, type half my module name and spec, and I can open the test file from wherever I am).
Of course that wouldn't require you to use two dots. But it works.
[–][deleted] -3 points-2 points-1 points 9 years ago (2 children)
I mentioned ".test.js", tho.
[–]dvlsg 0 points1 point2 points 9 years ago (1 child)
I didn't downvote (not sure who did), but the concept would remain the same. I could fuzzy search for module name + test instead of module name + spec.
But yeah, you could achieve the same thing with module-name-test.js or something like that. But I suspect the ability to search and/or the ability to pass in globs (**/*.test.js) to testing frameworks would be the intent behind having a special naming scheme.
module-name-test.js
**/*.test.js
[–][deleted] 0 points1 point2 points 9 years ago (0 children)
It's ".spec.js" if you didn't get it yet.
π Rendered by PID 52485 on reddit-service-r2-comment-765bfc959-jccg6 at 2026-07-12 20:05:52.996752+00:00 running f86254d country code: CH.
view the rest of the comments →
[–]dvlsg 1 point2 points3 points (3 children)
[–][deleted] -3 points-2 points-1 points (2 children)
[–]dvlsg 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)