Suite

Suite

new Suite(title, parentContext, isRootopt)

Source:
See:

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

Parameters:
Name Type Attributes Default Description
title string

Suite title.

parentContext Context

Parent context instance.

isRoot boolean <optional>
false

Whether this is the root suite.

Extends

Members

(static, readonly) constants :string

Source:
Properties:
Name Type Description
EVENT_FILE_POST_REQUIRE string

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

EVENT_FILE_PRE_REQUIRE string

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

EVENT_FILE_REQUIRE string

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

EVENT_ROOT_SUITE_RUN string

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

HOOK_TYPE_AFTER_ALL string

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

HOOK_TYPE_AFTER_EACH string

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

HOOK_TYPE_BEFORE_ALL string

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

HOOK_TYPE_BEFORE_EACH string

Namespace for collection of a Suite's "before each" hooks.

EVENT_SUITE_ADD_SUITE string

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

EVENT_SUITE_ADD_HOOK_AFTER_ALL string

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

EVENT_SUITE_ADD_HOOK_AFTER_EACH string

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

EVENT_SUITE_ADD_HOOK_BEFORE_ALL string

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

EVENT_SUITE_ADD_HOOK_BEFORE_EACH string

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

EVENT_SUITE_ADD_TEST string

Emitted after a Test has been added to a Suite.

Suite-related constants.

Type:
  • string

Methods

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

Source:

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

Parameters:
Name Type Description
parent Suite

Parent suite (required!)

title string

Title

Returns:
Type
Suite

dispose()

Source:

cleans all references from this suite and all child suites.

fullTitle() → {string}

Source:

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

Returns:
Type
string

reset()

Source:

Resets the state initially or for a next run.

titlePath() → {Array:.<string:>}

Source:

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

Returns:
Type
Array:.<string:>

total() → {number}

Source:

Return the total number of tests.

Returns:
Type
number