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 Usage. |
The Mocha action is used to unit test Javascript running on node.js
A friendly name for this action (will be displayed in the actions workflow area).
Determines if this action will be run within the relevant stage.
The domain specific language or interface you are using in your tests. Choose either the BDD, TDD, Exports, QUnit and Require-style interface.
Where to run the Mocha command line. Mocha will look for tests in a 'test' subfolder under the working directory.
Paths or ANT patterns matching one or more test files.
Tick this to look for text files in subdirectories of the 'test' folder
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.
The Using drop down is populated with any property collector whose namespace matches the pattern defined by the Mocha Action. The pattern for this action is ^Mocha.*
If you create a property collector for this action, make sure you select the Path Finder PlugIn type and give it a name that will match the pattern above in blue.
For more in-depth explanations on property collectors see Managing Property Collectors.
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.
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.
Tick this to treat each test filter string as a regular expression.
Tick this to us the filter strings to exclude tests. Only tests not macthing any of the strings (or regular expressions) will be processed.
Specify any modules required for all tests which you do not need to reference e.g. ones which support existing references. One module per line.
Path to the Mocha options file. Leave blank to use no options file or default to test/mocha.opts relative to working directory.
A Comma-delimited list of compiler modules to use to compile files.
Tick this to force all tests to take a asynchronous callback..
Tick to show full stack trace in the report file.
Tick to expose the Javascript garbage collector to your tests so you can, for example, force garbage collection.
Tick this to cause the build to fail if any tests fail.
Tick this to cause the build to fail if an error occurred while running any test.
Check for global variable leaks
Tick to check for any global variable leaks during tests.
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.
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.
Tick to exit action if one test fails without running any further tests.
h before the timeout the the test will fail. Enter zero for no timeout.
Mocha needs to be installed to the working directory before the tasks can be run. Tick this to automatically install Mocha before running the Mocha command line. Leave this cleared if you are installing Mocha with a separate preceding NPM action
Multiple environment variables can be defined - one per line. These are set before the Mocha command line is run.