grunt-jasmine-node-cover

Grunt task for running jasmine-node with coverage

npm install grunt-jasmine-node-cover
3 downloads in the last week
12 downloads in the last month

What's grunt-jasmine-node-cover

A grunt.js task to run jasmine tests with coverage reports.

Installation

The recommended way is through the excellent NPM:

$ npm install grunt-jasmine-node-cover

Usage

Grunt file init config example :

grunt.initConfig({
  jasmine_node_cover: {
    specNameMatcher:'.*Spec', // will load only files with name finishing with 'Spec.js'
    projectRoot:'spec', // will load only files from 'spec' project directory
    requirejs:false,
    forceExit:true,
    jUnit:{
      report:true, // will generate a junit-like report
      savePath:'reports/', // will generate reports in 'reports' project directory
      useDotNotation:true,
      consolidate:true
    }
  }
});

grunt.loadNpmTasks('grunt-jasmine-node-cover');

grunt.registerTask('test', 'jasmine_node_cover');

then, type : grunt test

npm loves you