Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The domain specific language or interface you are using in your tests. Choose either the BDD, TDD, Exports, QUnit and Require-style interface.  [--ui]

Working Directory

Where to run the Mocha command line. Mocha will look for tests in a 'test' subfolder under the working directory.

...

Tick this to look for text files in subdirectories of the 'test' folder. [--recursive]

Report File

Where to save the test results. Path can be full or relative to working directory. Note that test results will be stored in XUnit format.

...

Use this to filter tests to those containing a specific string or one of a list of strings. The match is case-sensitive with one filter string per line. [--fgrep]

Use regular expressions

Tick this to treat each test filter string as a regular expression. Overrides the command line argument --fgrep to --grep

Invert filters 

Tick this to us the filter strings to exclude tests. Only tests not matching any of the strings (or regular expressions) will be processed. [--invert]

Required Modules

Specify any modules required for all test. One module name per line. [--required]

Note: This only works with modules which you do not need to reference e.g. ones which argument existing prototypes.

...

Path to the Mocha options file. Leave blank to use no options file or default to test/mocha.opts relative to working directory. [--opts]

Compilers

A Comma-delimited list of compiler modules to use to compile files. [--compilers]

Async only

Tick this to force all tests to take a asynchronous callback. [--async-only]

Show full stack trace

Tick to show full stack trace in the report file. [--full-trace]

Expose gc extension

Tick to expose the JavaScript garbage collector to your tests so you can, for example, force garbage collection.\ [--expose-gc]

Check for global variable leaks

Tick to check for any global variable leaks during tests. [--check-leaks]

Accepted Global Variables

...

Comma-delimited list of accepted global variable names. You can use * as a wildcard.  Leave empty to check all globals. Use '*' to ignore all globals. [--globals]

Timeout (ms)

Specify the time to wait for a test to finish. If the test does not finish before the timeout the the test will fail. Enter zero for no timeout. [–timeout | --no-timeout]

Bail

Tick to exit action if one test fails without running any further tests. [--bail]


Options

Pre-install Mocha to working directory using NPM

...