Credits: JavaScript Code Coverage using Karma-Coverage w/ Grunt

Rated: , 0 Comments
Total visits: 360
Posted on: 9th Jan 2015
JavaScript Code Coverage using Karma-Coverage w/ Grunt

plugin.** I am going to assume you already have JS tests running w/ Karma and Grunt **To accomplish this we first need to install the following NPM packagesnpm install istanbul �save-devnpm install karma-coverage �save-devNext thing we need to do is open our karma.conf.js file and make some changes to it.1) Update the reporters configurationreporters: ['progress', 'coverage'],2) Add a preprocessor section to the configuration. preprocessors: { // source files, that you wanna generate coverage for // do not include tests or libraries // (these files will be instrumented by Istanbul) '**/js/pa Credits: JavaScript Code Coverage using Karma-Coverage w/ Grunt

Comments
There are still no comments posted ...
Rate and post your comment


Login


Username:
Password:

Forgotten password?