Members
Date
- Source:
Save timer references to avoid Sinon interfering (see GH-237).
EventEmitter
Module dependencies.
(readonly) globals
Non-enumerable globals.
util
Module dependencies.
Methods
after(name, fn)
- Source:
Execute after running tests.
Parameters:
Name | Type | Description |
---|---|---|
name | string | |
fn | function |
afterEach(name, fn)
- Source:
Execute after each test case.
Parameters:
Name | Type | Description |
---|---|---|
name | string | |
fn | function |
before(name, fn)
- Source:
Execute before running tests.
Parameters:
Name | Type | Description |
---|---|---|
name | string | |
fn | function |
beforeEach(name, fn)
- Source:
Execute before each test case.
Parameters:
Name | Type | Description |
---|---|---|
name | string | |
fn | function |
Pending(message)
- Source:
Initialize a new Pending
error with the given message.
Parameters:
Name | Type | Description |
---|---|---|
message | string |
Progress()
- Source:
Initialize a new Progress
indicator.
runWithSuite(suite) → {function}
- Source:
This is only present if flag --delay is passed into Mocha. It triggers
root suite execution.
Parameters:
Name | Type | Description |
---|---|---|
suite | Suite | The root suite. |
Returns:
A function which runs the root suite
- Type
- function
Type Definitions
DoneCB(failures)
Callback to be invoked when test execution is complete.
Parameters:
Name | Type | Description |
---|---|---|
failures | number | Number of failures that occurred. |