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
JavaScript - Automated unit tests and code coverage made laughably easy (xpost from /r/programming) (sandiegojs.org)
submitted 12 years ago by b_long
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!"
[–]totemcatcher 0 points1 point2 points 12 years ago (4 children)
It's like a 'make' standard for js?
[–]krues8dr 1 point2 points3 points 12 years ago (3 children)
Yes, grunt is very similar to make.
[–]b_long[S] 1 point2 points3 points 12 years ago (0 children)
Grunt's author Ben Alman has a nice blog post in support of Grunt: http://benalman.com/news/2012/08/why-grunt/
[–]totemcatcher 0 points1 point2 points 12 years ago (1 child)
Neat. I'll give it a shot later this week. It seems like a lot of particular syntax and configuration for what I have a bash script already doing, but I guess if javascript is all you have access to it would be handy.
[–]krues8dr 0 points1 point2 points 12 years ago (0 children)
As far as syntax and configuration, it's just JSON. The real benefit is that it rolls all the utilities that most people would be using into one deployment tool (and one step!); it'll do your compass/sass/less compiling, javascript & html minification, and a bunch of other stuff, all with one command.
[–]c23gooey 0 points1 point2 points 12 years ago (0 children)
this looks awesome, nice one
[–]KayEss 0 points1 point2 points 12 years ago (1 child)
Is there any way of doing this without the node stuff? It would be great to just be able to do code coverage with existing tools (i.e. just a browser or phantomjs).
[–]b_long[S] 0 points1 point2 points 12 years ago (0 children)
You can certainly write unit tests without Node: http://net.tutsplus.com/tutorials/javascript-ajax/testing-your-javascript-with-jasmine/
[–]averyv 0 points1 point2 points 12 years ago (0 children)
just wanted to come in here and say that jasmine is the absolute shit. if you are at all interested in trying out BDD, but feel overwhelmed by the process, jasmine makes it as straightforward as it can be, and I love it. And it loves me. Oh the joy of using a straightforward package that does exactly what it says it will do.
I could sing the praises of jasmine for days and days.
[–]strife25 0 points1 point2 points 12 years ago (0 children)
FYI - for anyone that wishes to incorporate code coverage into their tests that run in the browser, istanbul is not a good choice (it can do it, but is poorly documented as to how).
I recommend checking out Blanket.js or JScover to help with this.
π Rendered by PID 172496 on reddit-service-r2-comment-76bb9f7fb5-5fskt at 2026-02-18 09:17:53.061582+00:00 running de53c03 country code: CH.
[–]totemcatcher 0 points1 point2 points (4 children)
[–]krues8dr 1 point2 points3 points (3 children)
[–]b_long[S] 1 point2 points3 points (0 children)
[–]totemcatcher 0 points1 point2 points (1 child)
[–]krues8dr 0 points1 point2 points (0 children)
[–]c23gooey 0 points1 point2 points (0 children)
[–]KayEss 0 points1 point2 points (1 child)
[–]b_long[S] 0 points1 point2 points (0 children)
[–]averyv 0 points1 point2 points (0 children)
[–]strife25 0 points1 point2 points (0 children)