Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
The Mocha action in Continua is a wrapper around the mocha command line. If you're having trouble using the Mocha action, please refer to the Mocha Command Line UsageReference.


The Mocha action is used to unit test JavaScript running on node.js

Mocha

Image RemovedImage Added

Name

A friendly name for this action (will be displayed in the actions workflow area).

...

Alternatively, you can select the Custom option from the Using drop down list and specify a path in the resulting input field that will be displayed. Please read Why it's a good idea to use a property collector before using this option.

Filters / Modules

Image Removed

Test Filters

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]

...

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.

Settings


Settings

Image AddedImage Removed

Options File

...

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


Filters / Modules

Options

Image Added

Test Filters

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.


Options

Image AddedImage Removed

Pre-install Mocha to working directory using NPM

...

If this is ticked, any warnings logged will not mark the action with a warning status.


Environment

Image RemovedImage Added

Environment Variables

...