Global

Type Definitions

FileCollectionResponse

Source:
Properties:
Name Type Description
files Array:.<string:>

A list of files to test

unmatchedFiles Array:.<UnmatchedFile:>

A list of unmatched files derived from the file arguments passed in.

Response object containing a list of files to test and unmatched files.

Type:
  • Object

MochaGlobalFixture() → {void|Promise:.<void:>}

Source:

A function that's invoked once which is either sync or async.
Can be a "teardown" or "setup". These will all share the same context.

Returns:
Type
void | Promise:.<void:>

MochaRootHookFunction() → {MochaRootHookObject|Promise:.<MochaRootHookObject:>}

Source:

An function that returns a MochaRootHookObject, either sync or async.

Returns:
Type
MochaRootHookObject | Promise:.<MochaRootHookObject:>

MochaRootHookObject

Source:
Properties:
Name Type Attributes Description
beforeAll function | Array:.<function()> <optional>

"Before all" hook(s)

beforeEach function | Array:.<function()> <optional>

"Before each" hook(s)

afterAll function | Array:.<function()> <optional>

"After all" hook(s)

afterEach function | Array:.<function()> <optional>

"After each" hook(s)

An alternative way to define root hooks that works with parallel runs.

Type:
  • Object

PluginDefinition

Source:
Properties:
Name Type Attributes Description
exportName string

Named export to use

optionName string <optional>

Option name for Mocha constructor (use exportName if omitted)

validate PluginValidator <optional>

Validator function

finalize PluginFinalizer <optional>

Finalizer/aggregator function

An object making up all necessary parts of a plugin loader and aggregator

Type:
  • Object

PluginFinalizer(impls) → {Promise:.<*:>|*}

Source:

A function to finalize plugins impls of a particular ilk

Parameters:
Name Type Description
impls Array:.<*:>

User-supplied implementations

Returns:
Type
Promise:.<*:> | *

PluginLoaderOptions

Source:
Properties:
Name Type Attributes Description
pluginDefs Array:.<PluginDefinition:> <optional>

Plugin definitions

ignore Array:.<string:> <optional>

A list of plugins to ignore when loading

Options for PluginLoader

Type:
  • Object

PluginValidator(value) → {void}

Source:

A (sync) function to assert a user-supplied plugin implementation is valid.

Defined in a PluginDefinition.

This:
Parameters:
Name Type Description
value *

Value to check

Returns:
Type
void

UnmatchedFile

Source:
Properties:
Name Type Description
absolutePath string

A list of unmatched files derived from the file arguments passed in.

pattern string

A list of unmatched files derived from the file arguments passed in.

Diagnostic object containing unmatched files

Type:
  • Object