require("tasks/test")(grunt, gruntModuleDirectory)
this function registers a grunt task to run mocha tests and generate coverage reports. The below tasks are created
jshint:libfor running jshint tests on main source filesjshint:testfor running jshint tests on test files. This task is not created if there are no test files.jshint:buildfor running jshint tests on build files (GruntFile and package.json).mochacov:testfor running mocha tests. This task is not created if there are no test filesmochacov:coveragefor generating coverage report in terminal. This task is not created if there are no test filesmochacov:coverallsfor pushing coverage report to coveralls. This task is not created if there are no test filescoverallswhich is an alias formochacov:coveralls. If there are no tests, this task doesn't do anythingtestwhich is an alias forjshint:lib,jshint:test,jshint:build,mochacov:testandmochacov:coverage. If there are no tests, mochacov:* and jshint:test are not present.
Parameters:
| Name | Type | Description |
|---|---|---|
grunt |
* | the grunt object |
gruntModuleDirectory |
string | the directory where the grunt modules are located |
- Source:
this module registers a grunt task to run mocha tests and generate coverage reports.
- Source: