JavaScript code coverage with Jasmine

user153410 picture user153410 · Apr 23, 2013 · Viewed 41.1k times · Source

We are planning to introduce JavaScript unit testing in our project and so far Jasmine appears to be one of the better BDD unit testing frameworks for JavaScript. Now I am wondering how can we monitor code coverage of our JavaScript code. Are there any tools/plugins that we could use? We are a Microsoft shop and use .NET/MVC 4.

Answer

Andreas Köberle picture Andreas Köberle · Apr 24, 2013

There is the Istanbul code coverage tool. And, as there is a grunt plugin for Istanbul/Jasmine it should work with Jasmine.