Global

Members

Date

Source:

Save timer references to avoid Sinon interfering (see GH-237).

EventEmitter

Source:

Module dependencies.

(readonly) globals

Source:

Non-enumerable globals.

util

Source:

Module dependencies.

Methods

after(name, fn)

Source:

Execute after running tests.

Parameters:
NameTypeDescription
namestring
fnfunction

afterEach(name, fn)

Source:

Execute after each test case.

Parameters:
NameTypeDescription
namestring
fnfunction

before(name, fn)

Source:

Execute before running tests.

Parameters:
NameTypeDescription
namestring
fnfunction

beforeEach(name, fn)

Source:

Execute before each test case.

Parameters:
NameTypeDescription
namestring
fnfunction

Pending(message)

Source:

Initialize a new Pending error with the given message.

Parameters:
NameTypeDescription
messagestring

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:
NameTypeDescription
suiteSuite

The root suite.

Returns:

A function which runs the root suite

Type
function

Type Definitions

DoneCB(failures)

Source:

Callback to be invoked when test execution is complete.

Parameters:
NameTypeDescription
failuresnumber

Number of failures that occurred.