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

module:lib/cli/options()

Source:
Deprecated:
  • Deprecated in v6.0.0; This function is no longer used internally and will be removed in a future version.
See:

Prepends options from run-control file to the command line arguments.

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)

Source:

Callback to be invoked when test execution is complete.

Parameters:
Name Type Description
failures number

Number of failures that occurred.