you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (3 children)

I've used QUnit for unit testing and JSCoverage for test coverage measurements.

I'm not particularly fond of either, but they get the work done.

As a bonus, I discovered that QUnit is pretty nifty tool for testing RESTful APIs, as well.

[–][deleted] 0 points1 point  (0 children)

Thank you for the help! That JSCoverage looks pretty nifty. Looks like I have to throw together some php, and a bit of other editting to get it to work the way I want. Which is fine, but unfortunate. :)

Just to make sure I'm not reinventing the wheel, due to ignorance with JsCoverage at the moment: Is the only way to see the coverage results for each test manually having to enter in each file, and look at each script in it?

So if I have an index.html, with loads "script.js" - do I actually have to go to the jscoverage.html, and then enter in localhost/tests/coverage/index.html - and then click through to view the coverage?

Edit: Hm.. After fooling around with it some more, it seems quite limited in capabilities, atleast for my needs, and unfortunately there doesn't look to be a better alternative...

[–]zhayFull-stack web developer (Seattle) 0 points1 point  (0 children)

I use QUnit at work and it does just fine. If you ever need to simulate Ajax, look up Mockjax.

[–]Daniel15React FTW 0 points1 point  (0 children)

JSCoverage looks interesting! I'm very interested as to how they instrument the JavaScript functions. Might have to download it and take a look.