Suite

Suite

new Suite(title, parentContext, isRootopt)

Source:
See:

Constructs a new Suite instance with the given title, ctx, and isRoot.

Parameters:
NameTypeAttributesDefaultDescription
titlestring

Suite title.

parentContextContext

Parent context instance.

isRootboolean<optional>
false

Whether this is the root suite.

Extends

Members

(static, readonly) constants :string

Source:
Properties:
NameTypeDescription
EVENT_FILE_POST_REQUIREstring

Event emitted after a test file has been loaded Not emitted in browser.

EVENT_FILE_PRE_REQUIREstring

Event emitted before a test file has been loaded. In browser, this is emitted once an interface has been selected.

EVENT_FILE_REQUIREstring

Event emitted immediately after a test file has been loaded. Not emitted in browser.

EVENT_ROOT_SUITE_RUNstring

Event emitted when global.run() is called (use with delay option)

HOOK_TYPE_AFTER_ALLstring

Namespace for collection of a Suite's "after all" hooks

HOOK_TYPE_AFTER_EACHstring

Namespace for collection of a Suite's "after each" hooks

HOOK_TYPE_BEFORE_ALLstring

Namespace for collection of a Suite's "before all" hooks

HOOK_TYPE_BEFORE_EACHstring

Namespace for collection of a Suite's "before all" hooks

EVENT_SUITE_ADD_HOOK_AFTER_ALLstring

Emitted after an "after all" Hook has been added to a Suite. Deprecated

EVENT_SUITE_ADD_HOOK_AFTER_EACHstring

Emitted after an "after each" Hook has been added to a Suite Deprecated

EVENT_SUITE_ADD_HOOK_BEFORE_ALLstring

Emitted after an "before all" Hook has been added to a Suite Deprecated

EVENT_SUITE_ADD_HOOK_BEFORE_EACHstring

Emitted after an "before each" Hook has been added to a Suite Deprecated

EVENT_SUITE_ADD_SUITEstring

Emitted after a child Suite has been added to a Suite. Deprecated

EVENT_SUITE_ADD_TESTstring

Emitted after a Test has been added to a Suite. Deprecated

Suite-related constants.

Type:
  • string

Methods

(static) create(parent, title) → {Suite}

Source:

Create a new Suite with the given title and parent Suite.

Parameters:
NameTypeDescription
parentSuite

Parent suite (required!)

titlestring

Title

Returns:
Type
Suite

fullTitle() → {string}

Source:

Return the full title generated by recursively concatenating the parent's
full title.

Returns:
Type
string

titlePath() → {string}

Source:

Return the title path generated by recursively concatenating the parent's
title path.

Returns:
Type
string

total() → {number}

Source:

Return the total number of tests.

Returns:
Type
number