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

Latest commit

 

History

History
46 lines (36 loc) · 2.98 KB

cp.spec.Definition.md

File metadata and controls

46 lines (36 loc) · 2.98 KB

docs » cp.spec.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
  • Definition
  • Methods - API calls which can only be made on an object returned by a constructor
  • run

API Documentation

Functions

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

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