0.1.3 • Published 10 years ago

grunt-jscoverage v0.1.3

Weekly downloads
88
License
-
Repository
github
Last release
10 years ago

grunt-jscoverage

Grunt task for jscoverage; which will parse your source code and generate an instrumented version allowing testing tools to generate code coverage reports.

NPM stats

Install

Install npm package

npm install grunt-jscoverage --save-dev

Add this line to your project's Gruntfile:

grunt.loadNpmTasks("grunt-jscoverage");

Configure

grunt.initConfig({
  jscoverage: {
    src: {
      expand: true,
      cwd: 'src/',
      src: ['**/*.js'],
      dest: 'src-cov/',
      ext: '.js',
    },
    otherstuff: {
      expand: true,
      cwd: 'otherstuff/',
      src: ['**/*.js'],
      dest: 'otherstuff-cov/',
      ext: '.js',
    },
    options: {
      // custom options
    }
  }
});

See Grunt docs for detailed explanation.

Options will be passed to jscoverage as is. Unfortunately, jscoverage doesn't provide any documentation about its programmatic API, so take a look at function processFile() in its file index.js for details.

Run

grunt jscoverage
0.1.3

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago