ZEST / base.gruntrunner / Module: tasks/test

tasks/test

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 files
  • jshint: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 files
  • mochacov:coverage for generating coverage report in terminal. This task is not created if there are no test files
  • mochacov:coveralls for pushing coverage report to coveralls. This task is not created if there are no test files
  • coveralls which is an alias for mochacov:coveralls. If there are no tests, this task doesn't do anything
  • test which is an alias for jshint:lib, jshint:test, jshint:build, mochacov:test and mochacov: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:

Requires