Runnable

Runnable

new Runnable(title, fn)

Source:

Initialize a new Runnable with the given title and callback fn. Derived from EventEmitter

Parameters:
NameTypeDescription
titleString
fnfunction

Extends

  • EventEmitter

Methods

clearTimeout()

Source:

Clear the timeout.

currentRetry()

Source:

Set or get current retry

enableTimeouts(enabled) → {Runnable|boolean}

Source:

Set and get whether timeout is enabled.

Parameters:
NameTypeDescription
enabledboolean
Returns:

enabled or Runnable instance.

Type
Runnable | boolean

globals(globals)

Source:

Set or get a list of whitelisted globals for this test run.

Parameters:
NameTypeDescription
globalsArray.<string>

inspect() → {string}

Source:

Inspect the runnable void of private properties.

Returns:
Type
string

isPending()

Source:

Check if this runnable or its parent suite is marked as pending.

resetTimeout()

Source:

Reset the timeout.

retries()

Source:

Set or get number of retries.

run(fn)

Source:

Run the test and invoke fn(err).

Parameters:
NameTypeDescription
fnfunction

slow(ms) → {Runnable|number}

Source:

Set or get slow ms.

Parameters:
NameTypeDescription
msnumber | string
Returns:

ms or Runnable instance.

Type
Runnable | number

timeout(ms) → {Runnable|number}

Source:

Set & get timeout ms.

Parameters:
NameTypeDescription
msnumber | string
Returns:

ms or Runnable instance.

Type
Runnable | number