Internationalisation
Bundled Plugins API
Definition
A Definition is a superclass for a "runnable" specification. It doesn't do anything itself, but provides a common ancestor for all implementation classes like Specification and Scenario.

API Overview

  • Functions - API calls offered directly by the extension
  • is
  • Constructors - API calls which return an object, typically one that offers API methods
  • Methods - API calls which can only be made on an object returned by a constructor
  • run

API Documentation

Functions

is

Signature
cp.spec.Definition.is(instance) -> boolean
Type
Function
Description
Called as a method, this will check if the provided object is an instance of this class.
Parameters
  • instance - The instance to check.
Returns
  • true if the instance is an instance of this class.

Constructors

Signature
cp.spec.Definition(name[, doing]) -> cp.spec.Definition
Type
Constructor
Description
Creates a new test definition.
Parameters
  • name - The name

Methods

run

Signature
cp.spec.Definition:run([...]) -> cp.spec.Run
Type
Method
Description
Runs the definition with the specified filter string, function or table of strings and functions.
Parameters
  • ... - (optional) The list of filters to apply to any child definitions.
Returns
Last modified 1mo ago