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:lib
for running jshint tests on main source filesjshint:test
for running jshint tests on test files. This task is not created if there are no test files.jshint:build
for running jshint tests on build files (GruntFile and package.json).mochacov:test
for running mocha tests. This task is not created if there are no test filesmochacov:coverage
for generating coverage report in terminal. This task is not created if there are no test filesmochacov:coveralls
for pushing coverage report to coveralls. This task is not created if there are no test filescoveralls
which is an alias formochacov:coveralls
. If there are no tests, this task doesn't do anythingtest
which is an alias forjshint:lib
,jshint:test
,jshint:build
,mochacov:test
andmochacov: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: