# grunt-qunit-cov
Grunt plugin for qunit unit test with coverage
Getting Started
This plugin has two external dependencies, both must be downloaded, extracted and registered in the PATH environment variable:
Install the module with: npm install grunt-unit-cov
Then load it from your own grunt.js
file:
grunt;
Documentation
This plugin provides one task: qunit-cov
. It's multi tasks, meaning that grunt will automatically iterate over all qunit-cov
targets if a target is not specified.
qunit-cov
This is similar to the built-in qunit
task, though the configuration is different. Here's an example:
"qunit-cov": test: minimum: 09 srcDir: 'src' depDirs: '3rd' 'test' 'css' outDir: 'testResults' testFiles: 'test/*.html'
minimum
specifies the minimum coverage of all files to task pass, srcDir
the directory to be instrumented by jscoverage and copied to outDir
, depDirs
the dependencies directory list will be copied to outDir
and testFiles
parameter is a list of all files to be tested with qunit.
After running there will be a folder called out
inside the outDir
specified with coverage.html, which contains the summary of execution and other files of the srcDir
.
Contributing
Please use the issue tracker and pull requests.
License
Copyright (c) 2012 Afonso França Licensed under the MIT license.