Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
117 lines (97 loc) · 8.86 KB

cp.spec.Handler.md

File metadata and controls

117 lines (97 loc) · 8.86 KB

docs » cp.spec.Handler


Subclasses of this can customise how reports are handled. All methods do nothing.

See DefaultHandler.

API Overview

API Documentation

Functions

Signature cp.spec.Handler.default([handler]) -> cp.spec.Handler
Type Function
Description Gets and sets the current default Handler implementation.
Parameters
  • handler - (optional) when provided, sets the default to the specified handler.
Returns
  • The current Handler implementation.

Constructors

Signature cp.spec.Handler() -> cp.spec.Handler
Type Constructor
Description Creates a new Handler

Methods

Signature cp.spec.Handler:aborted(run)
Type Method
Description Call to indicate the run has had an abort.
Parameters
  • run - The test run.
  • msg - The message.
Signature cp.spec.Handler:checkVerbose(run) -> boolean
Type Method
Description Indicates if either the handler or the individual Run is
Signature cp.spec.Handler:failed(run)
Type Method
Description Call to indicate the run has failed.
Parameters
  • run - The test run.
  • msg - The message.
Signature cp.spec.Handler:filter(run, msg)
Type Method
Description Call to indicate the run is running due to being filtered.
Parameters
  • run - The test run.
  • msg - The message.
Signature cp.spec.Handler:passed(run)
Type Method
Description Call to indicate the run has passed.
Parameters
  • run - The test run.
Signature cp.spec.Handler:start(run)
Type Method
Description Call to indicate the run has started.
Parameters
  • run - The test run.
Signature cp.spec.Handler:stop(run)
Type Method
Description Call to indicate the run has completed.
Parameters
  • run - The test run.
Signature cp.spec.Handler:summary(run, report)
Type Method
Description Call to indicate the run has passed with the given report.
Parameters
  • run - The test run.
  • report - The test reports.
Signature cp.spec.Handler:verbose([isVerbose]) -> self
Type Method
Description Indicate that the handler is (or is not) verbose.
Parameters
  • isVerbose - (optional) If set to false, the handler will not be verbose. Defaults to true.
Returns
  • The Handler instance, for chaining.
Signature cp.spec.Handler:waiting(run, timeout)
Type Method
Description Call to indicate that the run is waiting asynchronously.
Parameters
  • run - The test run.
  • timeout - The timeout, in seconds.