Arcanist unit test engine for running Mocha tests with Istanbul for coverage reports.
- Copy the library to your project's root directory. A convenient way to do this is by adding this repository as a submodule.
$ git submodule add https://github.com/rutgersmobile/arc-unit-mocha.git .arc-unit-mocha
$ git submodule update --init- Load the library and set the test engine by adding these lines to your
.arcconfig:
"load": [
".arc-unit-mocha/src/"
],
"unit.engine": "MochaEngine"- Run
arc unitto run tests.
The following options can be set in .arcconfig:
| Key | Default value | Description |
|---|---|---|
unit.mocha.bin.mocha |
"./node_modules/mocha/bin/mocha" |
Path used to invoke mocha. |
unit.mocha.bin._mocha |
"./node_modules/mocha/bin/_mocha" |
Path used to invoke _mocha (used by istanbul). |
unit.mocha.bin.istanbul |
"./node_modules/istanbul/lib/cli.js" |
Path used to invoke istanbul. |
unit.mocha.coverage.reportdir |
"./coverage" |
Path to the directory where istanbul should output reports. |
unit.mocha.coverage.exclude |
null |
An array of paths to exclude from coverage reports. |
unit.mocha.include |
null |
An array of paths to include for the mocha tests. |
Example values for unit.mocha.coverage.exclude:
"unit.mocha.coverage.exclude": [
"ignoreme.js",
"submodules/**"
]