Skip to content

Arcanist extension for integrating Mocha unit tests and Istanbul coverage with Phabricator.

License

Notifications You must be signed in to change notification settings

rutgersmobile/arc-unit-mocha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

arc-unit-mocha

Arcanist unit test engine for running Mocha tests with Istanbul for coverage reports.

Installation

  1. 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
  1. Load the library and set the test engine by adding these lines to your .arcconfig:
"load": [
    ".arc-unit-mocha/src/"
],

"unit.engine": "MochaEngine"
  1. Run arc unit to run tests.

Configuration

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/**"
]

About

Arcanist extension for integrating Mocha unit tests and Istanbul coverage with Phabricator.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages