Versions Compared

Key

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

...

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]

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.


Settings

Image RemovedImage Added

Options File

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

...

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


Filters / Modules

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 RemovedImage Added

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

...