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
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 |
HOOK_TYPE_AFTER_ALL |
string | Namespace for collection of a |
HOOK_TYPE_AFTER_EACH |
string | Namespace for collection of a |
HOOK_TYPE_BEFORE_ALL |
string | Namespace for collection of a |
HOOK_TYPE_BEFORE_EACH |
string | Namespace for collection of a |
EVENT_SUITE_ADD_SUITE |
string | Emitted after a child |
EVENT_SUITE_ADD_HOOK_AFTER_ALL |
string | Emitted after an "after all" |
EVENT_SUITE_ADD_HOOK_AFTER_EACH |
string | Emitted after an "after each" |
EVENT_SUITE_ADD_HOOK_BEFORE_ALL |
string | Emitted after an "before all" |
EVENT_SUITE_ADD_HOOK_BEFORE_EACH |
string | Emitted after an "before each" |
EVENT_SUITE_ADD_TEST |
string | Emitted after a |
Suite-related constants.
Type:
- string
Methods
(static) create(parent, title) → {Suite}
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()
cleans all references from this suite and all child suites.
fullTitle() → {string}
Return the full title generated by recursively concatenating the parent's
full title.
Returns:
- Type
- string
reset()
Resets the state initially or for a next run.
titlePath() → {Array:.<string:>}
Return the title path generated by recursively concatenating the parent's
title path.
Returns:
total() → {number}
Return the total number of tests.
Returns:
- Type
- number