Module: test

cycligent. test

Cycligent Test Structure - When cycligent.test is defined Cycligent changes it behavior to facilitate testing.
Properties:
Name Type Description
scaffoldingReady boolean False until the test environment is fully initialized and ready at which time it becomes true. Provided so tests can watch and wait for the appropriate moment to start testing. Avoids tests starting early and causing erroneous failure reports.
clientOnly boolean Disable server-side functionality so tests can be run in a client only environment, when unit testing, for example.
doImports boolean When true the Cycligent import facilities continue to load scripts. When false Cycligent import facilities do not load any scripts, assuming they are loaded by the test setup.
instrument object Designates authorization and which scripts should be instrumented via istanbul for code coverage. This is useful when Cycligent import is still employed but the code coverage is desired. Cycligent Cloud will automatically instrument the code for testing and code coverage. The scripts to be instrumented are provided as a map followed by a boolean to indicated if they should be instrumented. This allows certain files to have their instrumentation toggled easily. See the example.
markupBase string Constructed during test setup. The absolute URL of the initial HTML file loaded.
root string The application root directory. USED ONLY DURING TEST STARTUP TO CONSTRUCT OTHER CYCLIGENT PROPERTIES.
context string Testing context provides tests with a context for realizing relative paths, essentially the same as what window.location would have been in the actual running code. USED ONLY DURING TEST STARTUP TO CONSTRUCT OTHER CYCLIGENT PROPERTIES.
host string The host running the tests. USED ONLY DURING TEST STARTUP TO CONSTRUCT OTHER CYCLIGENT PROPERTIES.
markupFile string The name, without the extension, of the initial HTML file loaded. USED ONLY DURING TEST STARTUP TO CONSTRUCT OTHER CYCLIGENT PROPERTIES.
markupExtension string The extension of the initial HTML file loaded. USED ONLY DURING TEST STARTUP TO CONSTRUCT OTHER CYCLIGENT PROPERTIES.
Source: