@types/mocha
- Version 10.0.10
- Published
- 96.1 kB
- No dependencies
- MIT license
Install
npm i @types/mocha
yarn add @types/mocha
pnpm add @types/mocha
Overview
TypeScript definitions for mocha
Index
Variables
Functions
Namespaces
mocha
- after
- afterEach
- AsyncFunc
- before
- beforeEach
- Context
- describe
- Done
- ExclusiveSuiteFunction
- ExclusiveTestFunction
- Func
- Hook
- HookFunction
- Interface
- InterfaceContributions
- it
- Mocha
- MochaGlobals
- MochaInstanceOptions
- MochaOptions
- PendingSuiteFunction
- PendingTestFunction
- Reporter
- ReporterConstructor
- ReporterContributions
- RootHookObject
- run()
- Runnable
- Runnable
- Runnable
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- RunnerConstants
- RunnerOptions
- setup
- Stats
- suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- SuiteConstants
- SuiteFunction
- suiteSetup
- suiteTeardown
- teardown
- test
- Test
- TestFunction
- TestInterface
- xdescribe
- xit
Mocha
- after
- afterEach
- AsyncFunc
- before
- beforeEach
- Context
- describe
- Done
- ExclusiveSuiteFunction
- ExclusiveTestFunction
- Func
- Hook
- HookFunction
- Interface
- InterfaceContributions
- it
- MochaGlobals
- MochaInstanceOptions
- MochaOptions
- PendingSuiteFunction
- PendingTestFunction
- Reporter
- ReporterConstructor
- ReporterContributions
- RootHookObject
- run()
- Runnable
- Runnable
- Runnable
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- Runner
- RunnerConstants
- RunnerOptions
- setup
- Stats
- suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- Suite
- SuiteConstants
- SuiteFunction
- suiteSetup
- suiteTeardown
- teardown
- test
- Test
- TestFunction
- TestInterface
- xdescribe
- xit
Variables
variable after
var after: Mocha.HookFunction<Mocha.Hook>;
Execute after running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#after
variable afterEach
var afterEach: Mocha.HookFunction<Mocha.Hook>;
Execute after each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#afterEach
variable before
var before: Mocha.HookFunction<Mocha.Hook>;
Execute before running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#before
variable beforeEach
var beforeEach: Mocha.HookFunction<Mocha.Hook>;
Execute before each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#beforeEach
variable context
var context: Mocha.SuiteFunction;
Describe a "suite" containing nested suites and tests.
- _Only available when invoked via the mocha CLI._
variable describe
var describe: Mocha.SuiteFunction;
Describe a "suite" containing nested suites and tests.
- _Only available when invoked via the mocha CLI._
variable it
var it: Mocha.TestFunction;
Describes a test case.
- _Only available when invoked via the mocha CLI._
variable mocha
const mocha: BrowserMocha;
Mocha global.
- _Only supported in the browser._
variable setup
var setup: Mocha.HookFunction<void>;
Execute before each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#beforeEach
variable specify
var specify: Mocha.TestFunction;
Describes a test case.
- _Only available when invoked via the mocha CLI._
variable suite
var suite: Mocha.SuiteFunction;
Describe a "suite" containing nested suites and tests.
- _Only available when invoked via the mocha CLI._
variable suiteSetup
var suiteSetup: Mocha.HookFunction<void>;
Execute before running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#before
variable suiteTeardown
var suiteTeardown: Mocha.HookFunction<void>;
Execute after running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#after
variable teardown
var teardown: Mocha.HookFunction<void>;
Execute after each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#afterEach
variable test
var test: Mocha.TestFunction;
Describes a test case.
- _Only available when invoked via the mocha CLI._
variable xcontext
var xcontext: Mocha.PendingSuiteFunction;
Pending suite.
- _Only available when invoked via the mocha CLI._
variable xdescribe
var xdescribe: Mocha.PendingSuiteFunction;
Pending suite.
- _Only available when invoked via the mocha CLI._
variable xit
var xit: Mocha.PendingTestFunction;
Describes a pending test case.
- _Only available when invoked via the mocha CLI._
variable xspecify
var xspecify: Mocha.PendingTestFunction;
Describes a pending test case.
- _Only available when invoked via the mocha CLI._
Functions
function run
run: () => void;
Triggers root suite execution.
- _Only available if flag --delay is passed into Mocha._ - _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#runWithSuite
Namespaces
namespace mocha
module 'mocha' {}
variable after
let after: HookFunction<Hook>;
Execute after running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#after
variable afterEach
let afterEach: HookFunction<Hook>;
Execute after each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#afterEach
variable before
let before: HookFunction<Hook>;
Execute before running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#before
variable beforeEach
let beforeEach: HookFunction<Hook>;
Execute before each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#beforeEach
variable describe
let describe: SuiteFunction;
Describe a "suite" containing nested suites and tests.
- _Only available when invoked via the mocha CLI._
variable it
let it: TestFunction;
Describes a test case.
- _Only available when invoked via the mocha CLI._
variable setup
let setup: HookFunction<void>;
Execute before each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#beforeEach
variable suite
let suite: SuiteFunction;
Describe a "suite" containing nested suites and tests.
- _Only available when invoked via the mocha CLI._
variable suiteSetup
let suiteSetup: HookFunction<void>;
Execute before running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#before
variable suiteTeardown
let suiteTeardown: HookFunction<void>;
Execute after running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#after
variable teardown
let teardown: HookFunction<void>;
Execute after each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#afterEach
variable test
let test: TestFunction;
Describes a test case.
- _Only available when invoked via the mocha CLI._
variable xdescribe
let xdescribe: PendingSuiteFunction;
Describe a pending suite.
- _Only available when invoked via the mocha CLI._
variable xit
let xit: PendingTestFunction;
Describes a pending test case.
- _Only available when invoked via the mocha CLI._
function run
run: () => void;
Triggers root suite execution.
- _Only available if flag --delay is passed into Mocha._ - _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#runWithSuite
class Context
class Context {}
Test context
See Also
https://mochajs.org/api/module-Context.html#~Context
property currentTest
currentTest?: Test;
property test
test?: Runnable;
method retries
retries: { (): number; (n: number): this };
Get the number of allowed retries on failed tests.
Set the number of allowed retries on failed tests.
method runnable
runnable: { (): Runnable; (runnable: Runnable): this };
Get the context
Runnable
.Set the context
Runnable
.
method skip
skip: () => never;
Mark a test as skipped.
method slow
slow: { (): number; (ms: string | number): this };
Get test slowness threshold.
Set test slowness threshold.
method timeout
timeout: { (): number; (ms: string | number): this };
Get test timeout.
Set test timeout.
class Hook
class Hook extends Runnable {}
Initialize a new
Hook
with the giventitle
and callbackfn
See Also
https://mochajs.org/api/Hook.html
property originalTitle
originalTitle?: string;
property type
type: string;
method error
error: { (): any; (err: any): void };
Get the test
err
.See Also
https://mochajs.org/api/Hook.html#error
Set the test
err
.See Also
https://mochajs.org/api/Hook.html#error
class Mocha
class Mocha {}
Mocha API
See Also
https://mochajs.org/api/mocha
constructor
constructor(options?: Mocha.MochaOptions);
property files
files: string[];
property globalSetup
globalSetup: Mocha.HookFunction<void>;
Configures one or more global setup fixtures. If given no parameters, unsets any previously-set fixtures.
See Also
https://mochajs.org/api/mocha#globalSetup
property globalTeardown
globalTeardown: Mocha.HookFunction<void>;
Configures one or more global teardown fixtures. If given no parameters, unsets any previously-set fixtures.
See Also
https://mochajs.org/api/mocha#globalTeardown
property options
options: Mocha.MochaInstanceOptions;
property suite
suite: Mocha.Suite;
method addFile
addFile: (file: string) => this;
Add test
file
.See Also
https://mochajs.org/api/mocha#addFile
method allowUncaught
allowUncaught: () => boolean;
Enable uncaught errors to propagate (in browser).
See Also
https://mochajs.org/api/mocha#allowUncaught
method asyncOnly
asyncOnly: () => this;
Makes all tests async (accepting a callback)
See Also
https://mochajs.org/api/mocha#asyncOnly.
method bail
bail: (bail?: boolean) => this;
Enable or disable bailing on the first failure.
See Also
https://mochajs.org/api/mocha#bail
method checkLeaks
checkLeaks: () => this;
Enable global leak checking.
See Also
https://mochajs.org/api/mocha#checkLeaks
method cleanReferencesAfterRun
cleanReferencesAfterRun: (clean?: boolean) => this;
Enables or disables whether or not to dispose after each test run. Disable this to ensure you can run the test suite multiple times. If disabled, be sure to dispose mocha when you're done to prevent memory leaks.
See Also
https://mochajs.org/api/mocha#cleanReferencesAfterRun
method delay
delay: () => boolean;
Delay root suite execution.
See Also
https://mochajs.org/api/mocha#delay
method dispose
dispose: () => void;
Manually dispose this mocha instance. Mark this instance as
disposed
and unable to run more tests. It also removes function references to tests functions and hooks, so variables trapped in closures can be cleaned by the garbage collector.See Also
https://mochajs.org/api/mocha#dispose
method dryRun
dryRun: (dryRun?: boolean) => this;
Whether to activate dry-run mode.
Parameter dryRun
Whether to activate dry-run mode. Defaults to
true
.
method enableGlobalSetup
enableGlobalSetup: (enabled: boolean) => this;
Toggle execution of any global setup fixture(s)
See Also
https://mochajs.org/api/mocha#enableGlobalSetup
method enableGlobalTeardown
enableGlobalTeardown: (enabled: boolean) => this;
Toggle execution of any global teardown fixture(s)
See Also
https://mochajs.org/api/mocha#enableGlobalTeardown
method failZero
failZero: (failZero?: boolean) => this;
Fails test run if no tests encountered with exit-code 1.
See Also
https://mochajs.org/api/mocha#failZero
method fgrep
fgrep: (str: string) => this;
Escape string and add it to grep as a RegExp.
See Also
https://mochajs.org/api/mocha#fgrep
method forbidOnly
forbidOnly: () => boolean;
Tests marked only fail the suite
See Also
https://mochajs.org/api/mocha#forbidOnly
method forbidPending
forbidPending: () => boolean;
Pending tests and tests marked skip fail the suite
See Also
https://mochajs.org/api/mocha#forbidPending
method fullTrace
fullTrace: () => this;
Display long stack-trace on failing
See Also
https://mochajs.org/api/mocha#fullTrace
method globals
globals: (globals: string | readonly string[]) => this;
Ignore
globals
array or string.See Also
https://mochajs.org/api/mocha#globals
method grep
grep: (re: string | RegExp) => this;
Add regexp to grep, if
re
is a string it is escaped.See Also
https://mochajs.org/api/mocha#grep
method growl
growl: () => this;
Enable growl support.
See Also
https://mochajs.org/api/mocha#growl
method hasGlobalSetupFixtures
hasGlobalSetupFixtures: () => boolean;
Returns
true
if one or more global setup fixtures have been suppliedSee Also
https://mochajs.org/api/mocha#hasGlobalSetupFixtures
method hasGlobalTeardownFixtures
hasGlobalTeardownFixtures: () => boolean;
Returns
true
if one or more global teardown fixtures have been suppliedSee Also
https://mochajs.org/api/mocha#hasGlobalTeardownFixtures
method invert
invert: () => this;
Invert
.grep()
matches.See Also
https://mochajs.org/api/mocha#invert
method loadFiles
protected loadFiles: (fn?: () => void) => void;
Load registered files.
See Also
https://mochajs.org/api/mocha#loadFiles
method loadFilesAsync
loadFilesAsync: () => Promise<void>;
Loads ESM (and CJS) test files asynchronously.
See Also
https://mochajs.org/api/mocha#loadFilesAsync
method noHighlighting
noHighlighting: () => this;
Disable syntax highlighting (in browser).
See Also
https://mochajs.org/api/mocha#noHighlighting
method parallelMode
parallelMode: (enabled?: boolean) => this;
Toggles parallel mode.
Must be run before calling
run
. Changes theRunner
class to use; also enables lazy file loading if not already done so.See Also
https://mochajs.org/api/mocha#parallelMode
method reporter
reporter: { (reporter: Mocha.Reporter, reporterOptions?: any): this; (reporter?: string | Mocha.ReporterConstructor, reporterOptions?: any): this;};
Set reporter to one of the built-in reporters.
See Also
https://mochajs.org/api/mocha#reporter
Set reporter to the provided constructor, one of the built-in reporters, or loads a reporter from a module path. Defaults to
"spec"
.See Also
https://mochajs.org/api/mocha#reporter
method retries
retries: (n: number) => this;
Set the number of times to retry failed tests.
See Also
https://mochajs.org/api/mocha#retries
method rootHooks
rootHooks: (hooks: Mocha.RootHookObject) => this;
Assigns hooks to the root suite.
See Also
https://mochajs.org/api/mocha#rootHooks
method run
run: (fn?: (failures: number) => void) => Mocha.Runner;
Run tests and invoke
fn()
when complete.Note that
run
relies on Node'srequire
to execute the test interface functions and will be subject to the cache - if the files are already in therequire
cache, they will effectively be skipped. Therefore, to run tests multiple times or to run tests in files that are already in therequire
cache, make sure to clear them from the cache first in whichever manner best suits your needs.See Also
https://mochajs.org/api/mocha#run
method slow
slow: (slow: string | number) => this;
Set slowness threshold in milliseconds.
See Also
https://mochajs.org/api/mocha#slow
method timeout
timeout: (timeout: string | number) => this;
Set the timeout in milliseconds.
See Also
https://mochajs.org/api/mocha#timeout
method ui
ui: { (name: Mocha.Interface): this; (name?: string): this };
Set test UI to one of the built-in test interfaces.
See Also
https://mochajs.org/api/mocha#ui
Set test UI to one of the built-in test interfaces or loads a test interface from a module path. Defaults to
"bdd"
.See Also
https://mochajs.org/api/mocha#ui
method unloadFiles
unloadFiles: () => this;
Unloads
files
from Node'srequire
cache.This allows required files to be "freshly" reloaded, providing the ability to reuse a Mocha instance programmatically. Note: does not clear ESM module files from the cache
class Runnable
class Runnable {}
Initialize a new
Runnable
with the giventitle
and callbackfn
.See Also
https://mochajs.org/api/Runnable.html
constructor
constructor(title: string, fn?: Func | AsyncFunc);
property allowUncaught
allowUncaught?: boolean;
property async
async: boolean;
property body
body: string;
property callback
callback?: Done;
property ctx
ctx?: Context;
property duration
duration?: number;
property file
file?: string;
property fn
fn: Func | AsyncFunc;
property id
id: string;
property parent
parent?: Suite;
property pending
pending: boolean;
property state
state?: 'failed' | 'passed' | 'pending';
property sync
sync: boolean;
property timedOut
timedOut: boolean;
property timer
timer?: any;
property title
title: string;
method clearTimeout
clearTimeout: () => void;
Clear the timeout.
See Also
https://mochajs.org/api/Runnable.html#clearTimeout
method currentRetry
protected currentRetry: { (): number; (n: number): void };
Set or get current retry
See Also
https://mochajs.org/api/Runnable.html#currentRetry
method fullTitle
fullTitle: () => string;
Return the full title generated by recursively concatenating the parent's full title.
method globals
globals: { (): string[]; (globals: readonly string[]): void };
Get a list of whitelisted globals for this test run.
See Also
https://mochajs.org/api/Runnable.html#globals
Set a list of whitelisted globals for this test run.
See Also
https://mochajs.org/api/Runnable.html#globals
method inspect
inspect: () => string;
Inspect the runnable void of private properties.
See Also
https://mochajs.org/api/Runnable.html#inspect
method isFailed
isFailed: () => boolean;
Return
true
if this Runnable has failed.
method isPassed
isPassed: () => boolean;
Return
true
if this Runnable has passed.
method isPending
isPending: () => boolean;
Check if this runnable or its parent suite is marked as pending.
See Also
https://mochajs.org/api/Runnable.html#isPending
method resetTimeout
resetTimeout: () => void;
Reset the timeout.
See Also
https://mochajs.org/api/Runnable.html#resetTimeout
method retries
retries: { (): number; (n: number): void };
Set or get number of retries.
See Also
https://mochajs.org/api/Runnable.html#retries
method run
run: (fn: Done) => void;
Run the test and invoke
fn(err)
.See Also
https://mochajs.org/api/Runnable.html#run
method skip
skip: () => never;
Halt and mark as pending.
method slow
slow: { (): number; (ms: string | number): this };
Get test slowness threshold.
See Also
https://mochajs.org/api/Runnable.html#slow
Set test slowness threshold.
See Also
https://mochajs.org/api/Runnable.html#slow
method timeout
timeout: { (): number; (ms: string | number): this };
Get test timeout.
See Also
https://mochajs.org/api/Runnable.html#timeout
Set test timeout.
See Also
https://mochajs.org/api/Runnable.html#timeout
method titlePath
titlePath: () => string[];
Return the title path generated by concatenating the parent's title path with the title.
class Runner
class Runner {}
Initialize a
Runner
for the givensuite
.See Also
https://mochajs.org/api/Mocha.Runner.html
constructor
constructor(suite: Suite, optionsOrDelay?: boolean | RunnerOptions);
Initialize a
Runner
at the Root Suite, which represents a hierarchy of Suites and Tests.Parameter suite
Root suite
Parameter optionsOrDelay
Options. If boolean (deprecated), whether or not to delay execution of root suite until ready.
property allowUncaught
allowUncaught?: boolean;
property asyncOnly
asyncOnly?: boolean;
property checkLeaks
checkLeaks?: boolean;
property constants
static readonly constants: RunnerConstants;
property currentRunnable
currentRunnable?: Runnable;
property failures
failures: number;
property forbidOnly
forbidOnly?: boolean;
property forbidPending
forbidPending?: boolean;
property fullStackTrace
fullStackTrace?: boolean;
property started
started: boolean;
property stats
stats?: Stats;
property suite
suite: Suite;
property test
test?: Test;
property total
total: number;
method abort
abort: () => this;
Cleanly abort execution.
See Also
https://mochajs.org/api/Mocha.Runner.html#.Runner#abort
method checkGlobals
protected checkGlobals: (test: Test) => void;
Check for global variable leaks.
See Also
https://mochajs.org/api/Mocha.Runner.html#checkGlobals
method dispose
dispose: () => void;
Removes all event handlers set during a run on this instance. Remark: this does *not* clean/dispose the tests or suites themselves.
See Also
https://mochajs.org/api/runner#dispose
method fail
protected fail: (test: Test, err: any) => void;
Fail the given
test
.See Also
https://mochajs.org/api/Mocha.Runner.html#fail
method failHook
protected failHook: (hook: Hook, err: any) => void;
Fail the given
hook
witherr
.Hook failures work in the following pattern: - If bail, then exit - Failed
before
hook skips all tests in a suite and subsuites, but jumps to correspondingafter
hook - Failedbefore each
hook skips remaining tests in a suite and jumps to correspondingafter each
hook, which is run only once - Failedafter
hook does not alter execution order - Failedafter each
hook skips remaining tests in a suite and subsuites, but executes otherafter each
hooksSee Also
https://mochajs.org/api/Mocha.Runner.html#failHook
method globalProps
protected globalProps: () => string[];
Return a list of global properties.
See Also
https://mochajs.org/api/Mocha.Runner.html#globalProps
method globals
globals: { (): string[]; (arr: readonly string[]): this };
Gets the allowed globals.
See Also
https://mochajs.org/api/Mocha.Runner.html#.Runner#globals
Allow the given
arr
of globals.See Also
https://mochajs.org/api/Mocha.Runner.html#.Runner#globals
method grep
grep: (re: RegExp, invert: boolean) => this;
Run tests with full titles matching
re
. Updates runner.total with number of tests matched.See Also
https://mochajs.org/api/Mocha.Runner.html#.Runner#grep
method grepTotal
grepTotal: (suite: Suite) => number;
Returns the number of tests matching the grep search for the given suite.
See Also
https://mochajs.org/api/Mocha.Runner.html#.Runner#grepTotal
method hook
protected hook: (name: string, fn: () => void) => void;
Run hook
name
callbacks and then invokefn()
.See Also
https://mochajs.org/api/Mocha.Runner.html#hook
method hookDown
protected hookDown: ( name: string, fn: (err?: any, errSuite?: Suite) => void) => void;
Run hooks from the bottom up.
See Also
https://mochajs.org/api/Mocha.Runner.html#hookDown
method hooks
protected hooks: ( name: string, suites: Suite[], fn: (err?: any, errSuite?: Suite) => void) => void;
Run hook
name
for the given array ofsuites
in order, and callbackfn(err, errSuite)
.See Also
https://mochajs.org/api/Mocha.Runner.html#hooks
method hookUp
protected hookUp: ( name: string, fn: (err?: any, errSuite?: Suite) => void) => void;
Run hooks from the top level down.
See Also
https://mochajs.org/api/Mocha.Runner.html#hookUp
method immediately
protected static immediately: (callback: Function) => void;
Wrapper for setImmediate, process.nextTick, or browser polyfill.
method parents
protected parents: () => Suite[];
Return an array of parent Suites from closest to furthest.
See Also
https://mochajs.org/api/Mocha.Runner.html#parents
method run
run: (fn?: (failures: number) => void) => this;
Run the root suite and invoke
fn(failures)
on completion.See Also
https://mochajs.org/api/Mocha.Runner.html#.Runner#run
method runSuite
protected runSuite: (suite: Suite, fn: (errSuite?: Suite) => void) => void;
Run the given
suite
and invoke the callbackfn()
when complete.See Also
https://mochajs.org/api/Mocha.Runner.html#runSuite
method runTest
protected runTest: (fn: Done) => any;
Run the current test and callback
fn(err)
.See Also
https://mochajs.org/api/Mocha.Runner.html#runTest
method runTests
protected runTests: (suite: Suite, fn: (errSuite?: Suite) => void) => void;
Run tests in the given
suite
and invoke the callbackfn()
when complete.See Also
https://mochajs.org/api/Mocha.Runner.html#runTests
method uncaught
uncaught: (err: any) => void;
Handle uncaught exceptions.
See Also
https://mochajs.org/api/Mocha.Runner.html#uncaught
class Suite
class Suite {}
Initialize a new
Suite
with the giventitle
andctx
.See Also
https://mochajs.org/api/Mocha.Suite.html
constructor
constructor(title: string, parentContext?: Context);
property constants
static readonly constants: SuiteConstants;
property ctx
ctx: Context;
property delayed
delayed: boolean;
property file
file?: string;
property parent
parent: Suite;
property pending
pending: boolean;
property root
root: boolean;
property suites
suites: Suite[];
property tests
tests: Test[];
property title
title: string;
method addSuite
addSuite: (suite: Suite) => this;
Add a test
suite
.See Also
https://mochajs.org/api/Mocha.Suite.html#addSuite
method addTest
addTest: (test: Test) => this;
Add a
test
to this suite.See Also
https://mochajs.org/api/Mocha.Suite.html#addTest
method afterAll
afterAll: { (fn?: Func): this; (fn?: AsyncFunc): this; (title: string, fn?: Func): this; (title: string, fn?: AsyncFunc): this;};
Run
fn(test[, done])
after running tests.See Also
https://mochajs.org/api/Mocha.Suite.html#afterAll
method afterEach
afterEach: { (fn?: Func): this; (fn?: AsyncFunc): this; (title: string, fn?: Func): this; (title: string, fn?: AsyncFunc): this;};
Run
fn(test[, done])
after each test case.See Also
https://mochajs.org/api/Mocha.Suite.html#afterEach
method bail
bail: { (): boolean; (bail: boolean): this };
Get whether to bail after first error.
See Also
https://mochajs.org/api/Mocha.Suite.html#bail
Set whether to bail after first error.
See Also
https://mochajs.org/api/Mocha.Suite.html#bail
method beforeAll
beforeAll: { (fn?: Func): this; (fn?: AsyncFunc): this; (title: string, fn?: Func): this; (title: string, fn?: AsyncFunc): this;};
Run
fn(test[, done])
before running tests.See Also
https://mochajs.org/api/Mocha.Suite.html#beforeAll
method beforeEach
beforeEach: { (fn?: Func): this; (fn?: AsyncFunc): this; (title: string, fn?: Func): this; (title: string, fn?: AsyncFunc): this;};
Run
fn(test[, done])
before each test case.See Also
https://mochajs.org/api/Mocha.Suite.html#beforeEach
method clone
clone: () => Suite;
Return a clone of this
Suite
.See Also
https://mochajs.org/api/Mocha.Suite.html#clone
method create
static create: (parent: Suite, title: string) => Suite;
Create a new
Suite
with the giventitle
and parentSuite
. When a suite with the same title is already present, that suite is returned to provide nicer reporter and more flexible meta-testing.See Also
https://mochajs.org/api/mocha#.exports.create
method dispose
dispose: () => void;
Cleans all references from this suite and all child suites.
https://mochajs.org/api/suite#dispose
method eachTest
eachTest: (fn: (test: Test) => void) => this;
Iterates through each suite recursively to find all tests. Applies a function in the format
fn(test)
.See Also
https://mochajs.org/api/Mocha.Suite.html#eachTest
method fullTitle
fullTitle: () => string;
Return the full title generated by recursively concatenating the parent's full title.
See Also
https://mochajs.org/api/Mocha.Suite.html#.Suite#fullTitle
method isPending
isPending: () => boolean;
Check if this suite or its parent suite is marked as pending.
See Also
https://mochajs.org/api/Mocha.Suite.html#isPending
method retries
retries: { (): number; (n: string | number): this };
Get number of times to retry a failed test.
See Also
https://mochajs.org/api/Mocha.Suite.html#retries
Set number of times to retry a failed test.
See Also
https://mochajs.org/api/Mocha.Suite.html#retries
method run
run: () => void;
This will run the root suite if we happen to be running in delayed mode.
See Also
https://mochajs.org/api/Mocha.Suite.html#run
method slow
slow: { (): number; (ms: string | number): this };
Get slow
ms
.See Also
https://mochajs.org/api/Mocha.Suite.html#slow
Set slow
ms
or short-hand such as "2s".See Also
https://mochajs.org/api/Mocha.Suite.html#slow
method timeout
timeout: { (): number; (ms: string | number): this };
Get timeout
ms
.See Also
https://mochajs.org/api/Mocha.Suite.html#timeout
Set timeout
ms
or short-hand such as "2s".See Also
https://mochajs.org/api/Mocha.Suite.html#timeout
method titlePath
titlePath: () => string[];
Return the title path generated by recursively concatenating the parent's title path.
See Also
https://mochajs.org/api/Mocha.Suite.html#.Suite#titlePath
method total
total: () => number;
Return the total number of tests.
See Also
https://mochajs.org/api/Mocha.Suite.html#.Suite#total
class Test
class Test extends Runnable {}
Initialize a new
Test
with the giventitle
and callbackfn
.See Also
https://mochajs.org/api/Test.html
interface ExclusiveSuiteFunction
interface ExclusiveSuiteFunction {}
call signature
(title: string, fn: (this: Suite) => void): Suite;
[bdd, tdd] Describe a "suite" with the given
title
and callbackfn
containing nested suites. Indicates this suite should be executed exclusively.- _Only available when invoked via the mocha CLI._
call signature
(title: string): Suite;
[qunit] Describe a "suite" with the given
title
. Indicates this suite should be executed exclusively.- _Only available when invoked via the mocha CLI._
interface ExclusiveTestFunction
interface ExclusiveTestFunction {}
call signature
(fn: Func): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given callback
fn
acting as a thunk. The name of the function is used as the name of the test. Indicates this test should be executed exclusively.- _Only available when invoked via the mocha CLI._
call signature
(fn: AsyncFunc): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given callback
fn
acting as a thunk. The name of the function is used as the name of the test. Indicates this test should be executed exclusively.- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn?: Func): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given
title
and callbackfn
acting as a thunk. Indicates this test should be executed exclusively.- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn?: AsyncFunc): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given
title
and callbackfn
acting as a thunk. Indicates this test should be executed exclusively.- _Only available when invoked via the mocha CLI._
interface HookFunction
interface HookFunction<T extends void | Hook = void> {}
call signature
(fn: Func): T;
[bdd, qunit, tdd] Describe a "hook" to execute the given callback
fn
. The name of the function is used as the name of the hook.- _Only available when invoked via the mocha CLI._
call signature
(fn: AsyncFunc): T;
[bdd, qunit, tdd] Describe a "hook" to execute the given callback
fn
. The name of the function is used as the name of the hook.- _Only available when invoked via the mocha CLI._
call signature
(name: string, fn?: Func): T;
[bdd, qunit, tdd] Describe a "hook" to execute the given
title
and callbackfn
.- _Only available when invoked via the mocha CLI._
call signature
(name: string, fn?: AsyncFunc): T;
[bdd, qunit, tdd] Describe a "hook" to execute the given
title
and callbackfn
.- _Only available when invoked via the mocha CLI._
interface InterfaceContributions
interface InterfaceContributions {}
Third-party declarations that want to add new entries to the
Interface
union can contribute names here.
interface MochaGlobals
interface MochaGlobals {}
Variables added to the global scope by Mocha when run in the CLI.
property after
after: HookFunction;
Execute after running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#after
property afterEach
afterEach: HookFunction;
Execute after each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#afterEach
property before
before: HookFunction;
Execute before running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#before
property beforeEach
beforeEach: HookFunction;
Execute before each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#beforeEach
property context
context: SuiteFunction;
Describe a "suite" containing nested suites and tests.
- _Only available when invoked via the mocha CLI._
property describe
describe: SuiteFunction;
Describe a "suite" containing nested suites and tests.
- _Only available when invoked via the mocha CLI._
property it
it: TestFunction;
Describes a test case.
- _Only available when invoked via the mocha CLI._
property run
run: typeof run;
property setup
setup: HookFunction;
Execute before each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#beforeEach
property specify
specify: TestFunction;
Describes a test case.
- _Only available when invoked via the mocha CLI._
property suite
suite: SuiteFunction;
Describe a "suite" containing nested suites and tests.
- _Only available when invoked via the mocha CLI._
property suiteSetup
suiteSetup: HookFunction;
Execute before running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#before
property suiteTeardown
suiteTeardown: HookFunction;
Execute after running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#after
property teardown
teardown: HookFunction;
Execute after each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#afterEach
property test
test: TestFunction;
Describes a test case.
- _Only available when invoked via the mocha CLI._
property xcontext
xcontext: PendingSuiteFunction;
Pending suite.
- _Only available when invoked via the mocha CLI._
property xdescribe
xdescribe: PendingSuiteFunction;
Pending suite.
- _Only available when invoked via the mocha CLI._
property xit
xit: PendingTestFunction;
Describes a pending test case.
- _Only available when invoked via the mocha CLI._
property xspecify
xspecify: PendingTestFunction;
Describes a pending test case.
- _Only available when invoked via the mocha CLI._
interface MochaInstanceOptions
interface MochaInstanceOptions extends MochaOptions {}
property files
files?: string[] | undefined;
interface MochaOptions
interface MochaOptions {}
Options to pass to Mocha.
property allowUncaught
allowUncaught?: boolean | undefined;
Propagate uncaught errors?
property asyncOnly
asyncOnly?: boolean | undefined;
Force
done
callback or promise?
property bail
bail?: boolean | undefined;
bail on the first test failure.
property checkLeaks
checkLeaks?: boolean | undefined;
Check for global variable leaks?
property color
color?: boolean | undefined;
Color TTY output from reporter
property delay
delay?: boolean | undefined;
Delay root suite execution?
property diff
diff?: boolean | undefined;
Show diff on failure?
property dryRun
dryRun?: boolean | undefined;
Report tests without running them?
property failZero
failZero?: boolean | undefined;
Fail test run if zero tests encountered.
property fgrep
fgrep?: string | undefined;
Test filter given string.
property forbidOnly
forbidOnly?: boolean | undefined;
Tests marked
only
fail the suite?
property forbidPending
forbidPending?: boolean | undefined;
Pending tests fail the suite?
property fullTrace
fullTrace?: boolean | undefined;
Full stacktrace upon failure?
property globals
globals?: string[] | undefined;
Variables expected in global scope.
property grep
grep?: string | RegExp | undefined;
Test filter given regular expression.
property growl
growl?: boolean | undefined;
Enable desktop notifications?
property inlineDiffs
inlineDiffs?: boolean | undefined;
Display inline diffs?
property invert
invert?: boolean | undefined;
Invert test filter matches?
property isWorker
isWorker?: boolean | undefined;
Should be
true
ifMocha
process is running in a worker process.
property jobs
jobs?: number | undefined;
Max number of worker processes for parallel runs.
property noHighlighting
noHighlighting?: boolean | undefined;
Disable syntax highlighting?
property parallel
parallel?: boolean | undefined;
Run jobs in parallel
property reporter
reporter?: string | ReporterConstructor | undefined;
Reporter name or constructor.
property reporterOptions
reporterOptions?: any;
Reporter settings object.
property require
require?: string[] | undefined;
Pathname of
rootHooks
plugin for parallel runs.
property retries
retries?: number | undefined;
Number of times to retry failed tests.
property rootHooks
rootHooks?: RootHookObject | undefined;
Hooks to bootstrap the root suite with.
property slow
slow?: number | undefined;
Slow threshold value.
property timeout
timeout?: number | string | undefined;
Timeout threshold value.
property ui
ui?: Interface | undefined;
Interface name.
interface PendingSuiteFunction
interface PendingSuiteFunction {}
[bdd, tdd] Describe a "suite" with the given
title
and callbackfn
containing nested suites. Indicates this suite should not be executed.- _Only available when invoked via the mocha CLI._
Returns
[tdd]
void
call signature
(title: string, fn: (this: Suite) => void): Suite | void;
interface PendingTestFunction
interface PendingTestFunction {}
call signature
(fn: Func): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given callback
fn
acting as a thunk. The name of the function is used as the name of the test. Indicates this test should not be executed.- _Only available when invoked via the mocha CLI._
call signature
(fn: AsyncFunc): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given callback
fn
acting as a thunk. The name of the function is used as the name of the test. Indicates this test should not be executed.- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn?: Func): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given
title
and callbackfn
acting as a thunk. Indicates this test should not be executed.- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn?: AsyncFunc): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given
title
and callbackfn
acting as a thunk. Indicates this test should not be executed.- _Only available when invoked via the mocha CLI._
interface ReporterConstructor
interface ReporterConstructor {}
construct signature
new (runner: Runner, options: MochaOptions): reporters.Base;
interface ReporterContributions
interface ReporterContributions {}
Third-party declarations that want to add new entries to the
Reporter
union can contribute names here.
property "json-stream"
'json-stream': never;
property base
base: never;
property Base
Base: never;
property dot
dot: never;
property Dot
Dot: never;
property html
html: never;
property HTML
HTML: never;
property json
json: never;
property JSON
JSON: never;
property JSONStream
JSONStream: never;
property landing
landing: never;
property Landing
Landing: never;
property list
list: never;
property List
List: never;
property markdown
markdown: never;
property Markdown
Markdown: never;
property min
min: never;
property Min
Min: never;
property nyan
nyan: never;
property Nyan
Nyan: never;
property progress
progress: never;
property Progress
Progress: never;
property spec
spec: never;
property Spec
Spec: never;
property tap
tap: never;
property TAP
TAP: never;
property xunit
xunit: never;
property XUnit
XUnit: never;
interface RootHookObject
interface RootHookObject {}
An alternative way to define root hooks that works with parallel runs.
Root hooks work with any interface, but the property names do not change. In other words, if you are using the tdd interface, suiteSetup maps to beforeAll, and setup maps to beforeEach.
As with other hooks,
this
refers to to the current context object.See Also
https://mochajs.org/#root-hook-plugins
property afterAll
afterAll?: Func | AsyncFunc | Func[] | AsyncFunc[] | undefined;
In serial mode, run after all tests end, once only. In parallel mode, run after all tests end, for each file.
property afterEach
afterEach?: Func | AsyncFunc | Func[] | AsyncFunc[] | undefined;
In both modes, run after every test.
property beforeAll
beforeAll?: Func | AsyncFunc | Func[] | AsyncFunc[] | undefined;
In serial mode (Mocha's default), before all tests begin, once only. In parallel mode, run before all tests begin, for each file.
property beforeEach
beforeEach?: Func | AsyncFunc | Func[] | AsyncFunc[] | undefined;
In both modes, run before each test.
interface Runnable
interface Runnable extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'error', error: any): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runnable
interface Runnable extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'error', error: any): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface RunnerConstants
interface RunnerConstants {}
property EVENT_DELAY_BEGIN
readonly EVENT_DELAY_BEGIN: 'waiting';
property EVENT_DELAY_END
readonly EVENT_DELAY_END: 'ready';
property EVENT_HOOK_BEGIN
readonly EVENT_HOOK_BEGIN: 'hook';
property EVENT_HOOK_END
readonly EVENT_HOOK_END: 'hook end';
property EVENT_RUN_BEGIN
readonly EVENT_RUN_BEGIN: 'start';
property EVENT_RUN_END
readonly EVENT_RUN_END: 'end';
property EVENT_SUITE_BEGIN
readonly EVENT_SUITE_BEGIN: 'suite';
property EVENT_SUITE_END
readonly EVENT_SUITE_END: 'suite end';
property EVENT_TEST_BEGIN
readonly EVENT_TEST_BEGIN: 'test';
property EVENT_TEST_END
readonly EVENT_TEST_END: 'test end';
property EVENT_TEST_FAIL
readonly EVENT_TEST_FAIL: 'fail';
property EVENT_TEST_PASS
readonly EVENT_TEST_PASS: 'pass';
property EVENT_TEST_PENDING
readonly EVENT_TEST_PENDING: 'pending';
property EVENT_TEST_RETRY
readonly EVENT_TEST_RETRY: 'retry';
property STATE_IDLE
readonly STATE_IDLE: 'idle';
property STATE_RUNNING
readonly STATE_RUNNING: 'running';
property STATE_STOPPED
readonly STATE_STOPPED: 'stopped';
interface RunnerOptions
interface RunnerOptions {}
property cleanReferencesAfterRun
cleanReferencesAfterRun?: boolean;
Whether to clean references to test fns and hooks when a suite is done.
property delay
delay?: boolean;
Whether to delay execution of root suite until ready.
property dryRun
dryRun?: boolean;
Whether to report tests without running them.
interface Stats
interface Stats {}
Test statistics
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface SuiteConstants
interface SuiteConstants {}
property EVENT_FILE_POST_REQUIRE
readonly EVENT_FILE_POST_REQUIRE: 'post-require';
property EVENT_FILE_PRE_REQUIRE
readonly EVENT_FILE_PRE_REQUIRE: 'pre-require';
property EVENT_FILE_REQUIRE
readonly EVENT_FILE_REQUIRE: 'require';
property EVENT_ROOT_SUITE_RUN
readonly EVENT_ROOT_SUITE_RUN: 'run';
property EVENT_SUITE_ADD_HOOK_AFTER_ALL
readonly EVENT_SUITE_ADD_HOOK_AFTER_ALL: 'afterAll';
property EVENT_SUITE_ADD_HOOK_AFTER_EACH
readonly EVENT_SUITE_ADD_HOOK_AFTER_EACH: 'afterEach';
property EVENT_SUITE_ADD_HOOK_BEFORE_ALL
readonly EVENT_SUITE_ADD_HOOK_BEFORE_ALL: 'beforeAll';
property EVENT_SUITE_ADD_HOOK_BEFORE_EACH
readonly EVENT_SUITE_ADD_HOOK_BEFORE_EACH: 'beforeEach';
property EVENT_SUITE_ADD_SUITE
readonly EVENT_SUITE_ADD_SUITE: 'suite';
property EVENT_SUITE_ADD_TEST
readonly EVENT_SUITE_ADD_TEST: 'test';
property HOOK_TYPE_AFTER_ALL
readonly HOOK_TYPE_AFTER_ALL: 'afterAll';
property HOOK_TYPE_AFTER_EACH
readonly HOOK_TYPE_AFTER_EACH: 'afterEach';
property HOOK_TYPE_BEFORE_ALL
readonly HOOK_TYPE_BEFORE_ALL: 'beforeAll';
property HOOK_TYPE_BEFORE_EACH
readonly HOOK_TYPE_BEFORE_EACH: 'beforeEach';
interface SuiteFunction
interface SuiteFunction {}
property only
only: ExclusiveSuiteFunction;
[bdd, tdd, qunit] Indicates this suite should be executed exclusively.
- _Only available when invoked via the mocha CLI._
property skip
skip: PendingSuiteFunction;
[bdd, tdd] Indicates this suite should not be executed.
- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn: (this: Suite) => void): Suite;
[bdd, tdd] Describe a "suite" with the given
title
and callbackfn
containing nested suites.- _Only available when invoked via the mocha CLI._
call signature
(title: string): Suite;
[qunit] Describe a "suite" with the given
title
.- _Only available when invoked via the mocha CLI._
interface TestFunction
interface TestFunction {}
property only
only: ExclusiveTestFunction;
Indicates this test should be executed exclusively.
- _Only available when invoked via the mocha CLI._
property skip
skip: PendingTestFunction;
Indicates this test should not be executed.
- _Only available when invoked via the mocha CLI._
method retries
retries: (n: number) => void;
Number of attempts to retry.
- _Only available when invoked via the mocha CLI._
call signature
(fn: Func): Test;
Describe a specification or test-case with the given callback
fn
acting as a thunk. The name of the function is used as the name of the test.- _Only available when invoked via the mocha CLI._
call signature
(fn: AsyncFunc): Test;
Describe a specification or test-case with the given callback
fn
acting as a thunk. The name of the function is used as the name of the test.- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn?: Func): Test;
Describe a specification or test-case with the given
title
and callbackfn
acting as a thunk.- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn?: AsyncFunc): Test;
Describe a specification or test-case with the given
title
and callbackfn
acting as a thunk.- _Only available when invoked via the mocha CLI._
type AsyncFunc
type AsyncFunc = (this: Context) => PromiseLike<any>;
Async callback function used for tests and hooks.
type Done
type Done = (err?: any) => void;
type Func
type Func = (this: Context, done: Done) => void;
Callback function used for tests and hooks.
type Interface
type Interface = keyof InterfaceContributions;
type Reporter
type Reporter = keyof ReporterContributions;
type TestInterface
type TestInterface = (suite: Suite) => void;
namespace Mocha
namespace Mocha {}
variable after
let after: HookFunction<Hook>;
Execute after running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#after
variable afterEach
let afterEach: HookFunction<Hook>;
Execute after each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#afterEach
variable before
let before: HookFunction<Hook>;
Execute before running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#before
variable beforeEach
let beforeEach: HookFunction<Hook>;
Execute before each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#beforeEach
variable describe
let describe: SuiteFunction;
Describe a "suite" containing nested suites and tests.
- _Only available when invoked via the mocha CLI._
variable it
let it: TestFunction;
Describes a test case.
- _Only available when invoked via the mocha CLI._
variable setup
let setup: HookFunction<void>;
Execute before each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#beforeEach
variable suite
let suite: SuiteFunction;
Describe a "suite" containing nested suites and tests.
- _Only available when invoked via the mocha CLI._
variable suiteSetup
let suiteSetup: HookFunction<void>;
Execute before running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#before
variable suiteTeardown
let suiteTeardown: HookFunction<void>;
Execute after running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#after
variable teardown
let teardown: HookFunction<void>;
Execute after each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#afterEach
variable test
let test: TestFunction;
Describes a test case.
- _Only available when invoked via the mocha CLI._
variable xdescribe
let xdescribe: PendingSuiteFunction;
Describe a pending suite.
- _Only available when invoked via the mocha CLI._
variable xit
let xit: PendingTestFunction;
Describes a pending test case.
- _Only available when invoked via the mocha CLI._
function run
run: () => void;
Triggers root suite execution.
- _Only available if flag --delay is passed into Mocha._ - _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#runWithSuite
class Context
class Context {}
Test context
See Also
https://mochajs.org/api/module-Context.html#~Context
property currentTest
currentTest?: Test;
property test
test?: Runnable;
method retries
retries: { (): number; (n: number): this };
Get the number of allowed retries on failed tests.
Set the number of allowed retries on failed tests.
method runnable
runnable: { (): Runnable; (runnable: Runnable): this };
Get the context
Runnable
.Set the context
Runnable
.
method skip
skip: () => never;
Mark a test as skipped.
method slow
slow: { (): number; (ms: string | number): this };
Get test slowness threshold.
Set test slowness threshold.
method timeout
timeout: { (): number; (ms: string | number): this };
Get test timeout.
Set test timeout.
class Hook
class Hook extends Runnable {}
Initialize a new
Hook
with the giventitle
and callbackfn
See Also
https://mochajs.org/api/Hook.html
property originalTitle
originalTitle?: string;
property type
type: string;
method error
error: { (): any; (err: any): void };
Get the test
err
.See Also
https://mochajs.org/api/Hook.html#error
Set the test
err
.See Also
https://mochajs.org/api/Hook.html#error
class Runnable
class Runnable {}
Initialize a new
Runnable
with the giventitle
and callbackfn
.See Also
https://mochajs.org/api/Runnable.html
constructor
constructor(title: string, fn?: Func | AsyncFunc);
property allowUncaught
allowUncaught?: boolean;
property async
async: boolean;
property body
body: string;
property callback
callback?: Done;
property ctx
ctx?: Context;
property duration
duration?: number;
property file
file?: string;
property fn
fn: Func | AsyncFunc;
property id
id: string;
property parent
parent?: Suite;
property pending
pending: boolean;
property state
state?: 'failed' | 'passed' | 'pending';
property sync
sync: boolean;
property timedOut
timedOut: boolean;
property timer
timer?: any;
property title
title: string;
method clearTimeout
clearTimeout: () => void;
Clear the timeout.
See Also
https://mochajs.org/api/Runnable.html#clearTimeout
method currentRetry
protected currentRetry: { (): number; (n: number): void };
Set or get current retry
See Also
https://mochajs.org/api/Runnable.html#currentRetry
method fullTitle
fullTitle: () => string;
Return the full title generated by recursively concatenating the parent's full title.
method globals
globals: { (): string[]; (globals: readonly string[]): void };
Get a list of whitelisted globals for this test run.
See Also
https://mochajs.org/api/Runnable.html#globals
Set a list of whitelisted globals for this test run.
See Also
https://mochajs.org/api/Runnable.html#globals
method inspect
inspect: () => string;
Inspect the runnable void of private properties.
See Also
https://mochajs.org/api/Runnable.html#inspect
method isFailed
isFailed: () => boolean;
Return
true
if this Runnable has failed.
method isPassed
isPassed: () => boolean;
Return
true
if this Runnable has passed.
method isPending
isPending: () => boolean;
Check if this runnable or its parent suite is marked as pending.
See Also
https://mochajs.org/api/Runnable.html#isPending
method resetTimeout
resetTimeout: () => void;
Reset the timeout.
See Also
https://mochajs.org/api/Runnable.html#resetTimeout
method retries
retries: { (): number; (n: number): void };
Set or get number of retries.
See Also
https://mochajs.org/api/Runnable.html#retries
method run
run: (fn: Done) => void;
Run the test and invoke
fn(err)
.See Also
https://mochajs.org/api/Runnable.html#run
method skip
skip: () => never;
Halt and mark as pending.
method slow
slow: { (): number; (ms: string | number): this };
Get test slowness threshold.
See Also
https://mochajs.org/api/Runnable.html#slow
Set test slowness threshold.
See Also
https://mochajs.org/api/Runnable.html#slow
method timeout
timeout: { (): number; (ms: string | number): this };
Get test timeout.
See Also
https://mochajs.org/api/Runnable.html#timeout
Set test timeout.
See Also
https://mochajs.org/api/Runnable.html#timeout
method titlePath
titlePath: () => string[];
Return the title path generated by concatenating the parent's title path with the title.
class Runner
class Runner {}
Initialize a
Runner
for the givensuite
.See Also
https://mochajs.org/api/Mocha.Runner.html
constructor
constructor(suite: Suite, optionsOrDelay?: boolean | RunnerOptions);
Initialize a
Runner
at the Root Suite, which represents a hierarchy of Suites and Tests.Parameter suite
Root suite
Parameter optionsOrDelay
Options. If boolean (deprecated), whether or not to delay execution of root suite until ready.
property allowUncaught
allowUncaught?: boolean;
property asyncOnly
asyncOnly?: boolean;
property checkLeaks
checkLeaks?: boolean;
property constants
static readonly constants: RunnerConstants;
property currentRunnable
currentRunnable?: Runnable;
property failures
failures: number;
property forbidOnly
forbidOnly?: boolean;
property forbidPending
forbidPending?: boolean;
property fullStackTrace
fullStackTrace?: boolean;
property started
started: boolean;
property stats
stats?: Stats;
property suite
suite: Suite;
property test
test?: Test;
property total
total: number;
method abort
abort: () => this;
Cleanly abort execution.
See Also
https://mochajs.org/api/Mocha.Runner.html#.Runner#abort
method checkGlobals
protected checkGlobals: (test: Test) => void;
Check for global variable leaks.
See Also
https://mochajs.org/api/Mocha.Runner.html#checkGlobals
method dispose
dispose: () => void;
Removes all event handlers set during a run on this instance. Remark: this does *not* clean/dispose the tests or suites themselves.
See Also
https://mochajs.org/api/runner#dispose
method fail
protected fail: (test: Test, err: any) => void;
Fail the given
test
.See Also
https://mochajs.org/api/Mocha.Runner.html#fail
method failHook
protected failHook: (hook: Hook, err: any) => void;
Fail the given
hook
witherr
.Hook failures work in the following pattern: - If bail, then exit - Failed
before
hook skips all tests in a suite and subsuites, but jumps to correspondingafter
hook - Failedbefore each
hook skips remaining tests in a suite and jumps to correspondingafter each
hook, which is run only once - Failedafter
hook does not alter execution order - Failedafter each
hook skips remaining tests in a suite and subsuites, but executes otherafter each
hooksSee Also
https://mochajs.org/api/Mocha.Runner.html#failHook
method globalProps
protected globalProps: () => string[];
Return a list of global properties.
See Also
https://mochajs.org/api/Mocha.Runner.html#globalProps
method globals
globals: { (): string[]; (arr: readonly string[]): this };
Gets the allowed globals.
See Also
https://mochajs.org/api/Mocha.Runner.html#.Runner#globals
Allow the given
arr
of globals.See Also
https://mochajs.org/api/Mocha.Runner.html#.Runner#globals
method grep
grep: (re: RegExp, invert: boolean) => this;
Run tests with full titles matching
re
. Updates runner.total with number of tests matched.See Also
https://mochajs.org/api/Mocha.Runner.html#.Runner#grep
method grepTotal
grepTotal: (suite: Suite) => number;
Returns the number of tests matching the grep search for the given suite.
See Also
https://mochajs.org/api/Mocha.Runner.html#.Runner#grepTotal
method hook
protected hook: (name: string, fn: () => void) => void;
Run hook
name
callbacks and then invokefn()
.See Also
https://mochajs.org/api/Mocha.Runner.html#hook
method hookDown
protected hookDown: ( name: string, fn: (err?: any, errSuite?: Suite) => void) => void;
Run hooks from the bottom up.
See Also
https://mochajs.org/api/Mocha.Runner.html#hookDown
method hooks
protected hooks: ( name: string, suites: Suite[], fn: (err?: any, errSuite?: Suite) => void) => void;
Run hook
name
for the given array ofsuites
in order, and callbackfn(err, errSuite)
.See Also
https://mochajs.org/api/Mocha.Runner.html#hooks
method hookUp
protected hookUp: ( name: string, fn: (err?: any, errSuite?: Suite) => void) => void;
Run hooks from the top level down.
See Also
https://mochajs.org/api/Mocha.Runner.html#hookUp
method immediately
protected static immediately: (callback: Function) => void;
Wrapper for setImmediate, process.nextTick, or browser polyfill.
method parents
protected parents: () => Suite[];
Return an array of parent Suites from closest to furthest.
See Also
https://mochajs.org/api/Mocha.Runner.html#parents
method run
run: (fn?: (failures: number) => void) => this;
Run the root suite and invoke
fn(failures)
on completion.See Also
https://mochajs.org/api/Mocha.Runner.html#.Runner#run
method runSuite
protected runSuite: (suite: Suite, fn: (errSuite?: Suite) => void) => void;
Run the given
suite
and invoke the callbackfn()
when complete.See Also
https://mochajs.org/api/Mocha.Runner.html#runSuite
method runTest
protected runTest: (fn: Done) => any;
Run the current test and callback
fn(err)
.See Also
https://mochajs.org/api/Mocha.Runner.html#runTest
method runTests
protected runTests: (suite: Suite, fn: (errSuite?: Suite) => void) => void;
Run tests in the given
suite
and invoke the callbackfn()
when complete.See Also
https://mochajs.org/api/Mocha.Runner.html#runTests
method uncaught
uncaught: (err: any) => void;
Handle uncaught exceptions.
See Also
https://mochajs.org/api/Mocha.Runner.html#uncaught
class Suite
class Suite {}
Initialize a new
Suite
with the giventitle
andctx
.See Also
https://mochajs.org/api/Mocha.Suite.html
constructor
constructor(title: string, parentContext?: Context);
property constants
static readonly constants: SuiteConstants;
property ctx
ctx: Context;
property delayed
delayed: boolean;
property file
file?: string;
property parent
parent: Suite;
property pending
pending: boolean;
property root
root: boolean;
property suites
suites: Suite[];
property tests
tests: Test[];
property title
title: string;
method addSuite
addSuite: (suite: Suite) => this;
Add a test
suite
.See Also
https://mochajs.org/api/Mocha.Suite.html#addSuite
method addTest
addTest: (test: Test) => this;
Add a
test
to this suite.See Also
https://mochajs.org/api/Mocha.Suite.html#addTest
method afterAll
afterAll: { (fn?: Func): this; (fn?: AsyncFunc): this; (title: string, fn?: Func): this; (title: string, fn?: AsyncFunc): this;};
Run
fn(test[, done])
after running tests.See Also
https://mochajs.org/api/Mocha.Suite.html#afterAll
method afterEach
afterEach: { (fn?: Func): this; (fn?: AsyncFunc): this; (title: string, fn?: Func): this; (title: string, fn?: AsyncFunc): this;};
Run
fn(test[, done])
after each test case.See Also
https://mochajs.org/api/Mocha.Suite.html#afterEach
method bail
bail: { (): boolean; (bail: boolean): this };
Get whether to bail after first error.
See Also
https://mochajs.org/api/Mocha.Suite.html#bail
Set whether to bail after first error.
See Also
https://mochajs.org/api/Mocha.Suite.html#bail
method beforeAll
beforeAll: { (fn?: Func): this; (fn?: AsyncFunc): this; (title: string, fn?: Func): this; (title: string, fn?: AsyncFunc): this;};
Run
fn(test[, done])
before running tests.See Also
https://mochajs.org/api/Mocha.Suite.html#beforeAll
method beforeEach
beforeEach: { (fn?: Func): this; (fn?: AsyncFunc): this; (title: string, fn?: Func): this; (title: string, fn?: AsyncFunc): this;};
Run
fn(test[, done])
before each test case.See Also
https://mochajs.org/api/Mocha.Suite.html#beforeEach
method clone
clone: () => Suite;
Return a clone of this
Suite
.See Also
https://mochajs.org/api/Mocha.Suite.html#clone
method create
static create: (parent: Suite, title: string) => Suite;
Create a new
Suite
with the giventitle
and parentSuite
. When a suite with the same title is already present, that suite is returned to provide nicer reporter and more flexible meta-testing.See Also
https://mochajs.org/api/mocha#.exports.create
method dispose
dispose: () => void;
Cleans all references from this suite and all child suites.
https://mochajs.org/api/suite#dispose
method eachTest
eachTest: (fn: (test: Test) => void) => this;
Iterates through each suite recursively to find all tests. Applies a function in the format
fn(test)
.See Also
https://mochajs.org/api/Mocha.Suite.html#eachTest
method fullTitle
fullTitle: () => string;
Return the full title generated by recursively concatenating the parent's full title.
See Also
https://mochajs.org/api/Mocha.Suite.html#.Suite#fullTitle
method isPending
isPending: () => boolean;
Check if this suite or its parent suite is marked as pending.
See Also
https://mochajs.org/api/Mocha.Suite.html#isPending
method retries
retries: { (): number; (n: string | number): this };
Get number of times to retry a failed test.
See Also
https://mochajs.org/api/Mocha.Suite.html#retries
Set number of times to retry a failed test.
See Also
https://mochajs.org/api/Mocha.Suite.html#retries
method run
run: () => void;
This will run the root suite if we happen to be running in delayed mode.
See Also
https://mochajs.org/api/Mocha.Suite.html#run
method slow
slow: { (): number; (ms: string | number): this };
Get slow
ms
.See Also
https://mochajs.org/api/Mocha.Suite.html#slow
Set slow
ms
or short-hand such as "2s".See Also
https://mochajs.org/api/Mocha.Suite.html#slow
method timeout
timeout: { (): number; (ms: string | number): this };
Get timeout
ms
.See Also
https://mochajs.org/api/Mocha.Suite.html#timeout
Set timeout
ms
or short-hand such as "2s".See Also
https://mochajs.org/api/Mocha.Suite.html#timeout
method titlePath
titlePath: () => string[];
Return the title path generated by recursively concatenating the parent's title path.
See Also
https://mochajs.org/api/Mocha.Suite.html#.Suite#titlePath
method total
total: () => number;
Return the total number of tests.
See Also
https://mochajs.org/api/Mocha.Suite.html#.Suite#total
class Test
class Test extends Runnable {}
Initialize a new
Test
with the giventitle
and callbackfn
.See Also
https://mochajs.org/api/Test.html
interface ExclusiveSuiteFunction
interface ExclusiveSuiteFunction {}
call signature
(title: string, fn: (this: Suite) => void): Suite;
[bdd, tdd] Describe a "suite" with the given
title
and callbackfn
containing nested suites. Indicates this suite should be executed exclusively.- _Only available when invoked via the mocha CLI._
call signature
(title: string): Suite;
[qunit] Describe a "suite" with the given
title
. Indicates this suite should be executed exclusively.- _Only available when invoked via the mocha CLI._
interface ExclusiveTestFunction
interface ExclusiveTestFunction {}
call signature
(fn: Func): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given callback
fn
acting as a thunk. The name of the function is used as the name of the test. Indicates this test should be executed exclusively.- _Only available when invoked via the mocha CLI._
call signature
(fn: AsyncFunc): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given callback
fn
acting as a thunk. The name of the function is used as the name of the test. Indicates this test should be executed exclusively.- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn?: Func): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given
title
and callbackfn
acting as a thunk. Indicates this test should be executed exclusively.- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn?: AsyncFunc): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given
title
and callbackfn
acting as a thunk. Indicates this test should be executed exclusively.- _Only available when invoked via the mocha CLI._
interface HookFunction
interface HookFunction<T extends void | Hook = void> {}
call signature
(fn: Func): T;
[bdd, qunit, tdd] Describe a "hook" to execute the given callback
fn
. The name of the function is used as the name of the hook.- _Only available when invoked via the mocha CLI._
call signature
(fn: AsyncFunc): T;
[bdd, qunit, tdd] Describe a "hook" to execute the given callback
fn
. The name of the function is used as the name of the hook.- _Only available when invoked via the mocha CLI._
call signature
(name: string, fn?: Func): T;
[bdd, qunit, tdd] Describe a "hook" to execute the given
title
and callbackfn
.- _Only available when invoked via the mocha CLI._
call signature
(name: string, fn?: AsyncFunc): T;
[bdd, qunit, tdd] Describe a "hook" to execute the given
title
and callbackfn
.- _Only available when invoked via the mocha CLI._
interface InterfaceContributions
interface InterfaceContributions {}
Third-party declarations that want to add new entries to the
Interface
union can contribute names here.
interface MochaGlobals
interface MochaGlobals {}
Variables added to the global scope by Mocha when run in the CLI.
property after
after: HookFunction;
Execute after running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#after
property afterEach
afterEach: HookFunction;
Execute after each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#afterEach
property before
before: HookFunction;
Execute before running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#before
property beforeEach
beforeEach: HookFunction;
Execute before each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#beforeEach
property context
context: SuiteFunction;
Describe a "suite" containing nested suites and tests.
- _Only available when invoked via the mocha CLI._
property describe
describe: SuiteFunction;
Describe a "suite" containing nested suites and tests.
- _Only available when invoked via the mocha CLI._
property it
it: TestFunction;
Describes a test case.
- _Only available when invoked via the mocha CLI._
property run
run: typeof run;
property setup
setup: HookFunction;
Execute before each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#beforeEach
property specify
specify: TestFunction;
Describes a test case.
- _Only available when invoked via the mocha CLI._
property suite
suite: SuiteFunction;
Describe a "suite" containing nested suites and tests.
- _Only available when invoked via the mocha CLI._
property suiteSetup
suiteSetup: HookFunction;
Execute before running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#before
property suiteTeardown
suiteTeardown: HookFunction;
Execute after running tests.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#after
property teardown
teardown: HookFunction;
Execute after each test case.
- _Only available when invoked via the mocha CLI._
See Also
https://mochajs.org/api/global.html#afterEach
property test
test: TestFunction;
Describes a test case.
- _Only available when invoked via the mocha CLI._
property xcontext
xcontext: PendingSuiteFunction;
Pending suite.
- _Only available when invoked via the mocha CLI._
property xdescribe
xdescribe: PendingSuiteFunction;
Pending suite.
- _Only available when invoked via the mocha CLI._
property xit
xit: PendingTestFunction;
Describes a pending test case.
- _Only available when invoked via the mocha CLI._
property xspecify
xspecify: PendingTestFunction;
Describes a pending test case.
- _Only available when invoked via the mocha CLI._
interface MochaInstanceOptions
interface MochaInstanceOptions extends MochaOptions {}
property files
files?: string[] | undefined;
interface MochaOptions
interface MochaOptions {}
Options to pass to Mocha.
property allowUncaught
allowUncaught?: boolean | undefined;
Propagate uncaught errors?
property asyncOnly
asyncOnly?: boolean | undefined;
Force
done
callback or promise?
property bail
bail?: boolean | undefined;
bail on the first test failure.
property checkLeaks
checkLeaks?: boolean | undefined;
Check for global variable leaks?
property color
color?: boolean | undefined;
Color TTY output from reporter
property delay
delay?: boolean | undefined;
Delay root suite execution?
property diff
diff?: boolean | undefined;
Show diff on failure?
property dryRun
dryRun?: boolean | undefined;
Report tests without running them?
property failZero
failZero?: boolean | undefined;
Fail test run if zero tests encountered.
property fgrep
fgrep?: string | undefined;
Test filter given string.
property forbidOnly
forbidOnly?: boolean | undefined;
Tests marked
only
fail the suite?
property forbidPending
forbidPending?: boolean | undefined;
Pending tests fail the suite?
property fullTrace
fullTrace?: boolean | undefined;
Full stacktrace upon failure?
property globals
globals?: string[] | undefined;
Variables expected in global scope.
property grep
grep?: string | RegExp | undefined;
Test filter given regular expression.
property growl
growl?: boolean | undefined;
Enable desktop notifications?
property inlineDiffs
inlineDiffs?: boolean | undefined;
Display inline diffs?
property invert
invert?: boolean | undefined;
Invert test filter matches?
property isWorker
isWorker?: boolean | undefined;
Should be
true
ifMocha
process is running in a worker process.
property jobs
jobs?: number | undefined;
Max number of worker processes for parallel runs.
property noHighlighting
noHighlighting?: boolean | undefined;
Disable syntax highlighting?
property parallel
parallel?: boolean | undefined;
Run jobs in parallel
property reporter
reporter?: string | ReporterConstructor | undefined;
Reporter name or constructor.
property reporterOptions
reporterOptions?: any;
Reporter settings object.
property require
require?: string[] | undefined;
Pathname of
rootHooks
plugin for parallel runs.
property retries
retries?: number | undefined;
Number of times to retry failed tests.
property rootHooks
rootHooks?: RootHookObject | undefined;
Hooks to bootstrap the root suite with.
property slow
slow?: number | undefined;
Slow threshold value.
property timeout
timeout?: number | string | undefined;
Timeout threshold value.
property ui
ui?: Interface | undefined;
Interface name.
interface PendingSuiteFunction
interface PendingSuiteFunction {}
[bdd, tdd] Describe a "suite" with the given
title
and callbackfn
containing nested suites. Indicates this suite should not be executed.- _Only available when invoked via the mocha CLI._
Returns
[tdd]
void
call signature
(title: string, fn: (this: Suite) => void): Suite | void;
interface PendingTestFunction
interface PendingTestFunction {}
call signature
(fn: Func): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given callback
fn
acting as a thunk. The name of the function is used as the name of the test. Indicates this test should not be executed.- _Only available when invoked via the mocha CLI._
call signature
(fn: AsyncFunc): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given callback
fn
acting as a thunk. The name of the function is used as the name of the test. Indicates this test should not be executed.- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn?: Func): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given
title
and callbackfn
acting as a thunk. Indicates this test should not be executed.- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn?: AsyncFunc): Test;
[bdd, tdd, qunit] Describe a specification or test-case with the given
title
and callbackfn
acting as a thunk. Indicates this test should not be executed.- _Only available when invoked via the mocha CLI._
interface ReporterConstructor
interface ReporterConstructor {}
construct signature
new (runner: Runner, options: MochaOptions): reporters.Base;
interface ReporterContributions
interface ReporterContributions {}
Third-party declarations that want to add new entries to the
Reporter
union can contribute names here.
property "json-stream"
'json-stream': never;
property base
base: never;
property Base
Base: never;
property dot
dot: never;
property Dot
Dot: never;
property html
html: never;
property HTML
HTML: never;
property json
json: never;
property JSON
JSON: never;
property JSONStream
JSONStream: never;
property landing
landing: never;
property Landing
Landing: never;
property list
list: never;
property List
List: never;
property markdown
markdown: never;
property Markdown
Markdown: never;
property min
min: never;
property Min
Min: never;
property nyan
nyan: never;
property Nyan
Nyan: never;
property progress
progress: never;
property Progress
Progress: never;
property spec
spec: never;
property Spec
Spec: never;
property tap
tap: never;
property TAP
TAP: never;
property xunit
xunit: never;
property XUnit
XUnit: never;
interface RootHookObject
interface RootHookObject {}
An alternative way to define root hooks that works with parallel runs.
Root hooks work with any interface, but the property names do not change. In other words, if you are using the tdd interface, suiteSetup maps to beforeAll, and setup maps to beforeEach.
As with other hooks,
this
refers to to the current context object.See Also
https://mochajs.org/#root-hook-plugins
property afterAll
afterAll?: Func | AsyncFunc | Func[] | AsyncFunc[] | undefined;
In serial mode, run after all tests end, once only. In parallel mode, run after all tests end, for each file.
property afterEach
afterEach?: Func | AsyncFunc | Func[] | AsyncFunc[] | undefined;
In both modes, run after every test.
property beforeAll
beforeAll?: Func | AsyncFunc | Func[] | AsyncFunc[] | undefined;
In serial mode (Mocha's default), before all tests begin, once only. In parallel mode, run before all tests begin, for each file.
property beforeEach
beforeEach?: Func | AsyncFunc | Func[] | AsyncFunc[] | undefined;
In both modes, run before each test.
interface Runnable
interface Runnable extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'error', error: any): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runnable
interface Runnable extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'error', error: any): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'error', listener: (error: any) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface Runner
interface Runner extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'waiting', rootSuite: Suite): boolean; (name: 'start'): boolean; (name: 'end'): boolean; (name: 'suite', suite: Suite): boolean; (name: 'suite end', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'test end', test: Test): boolean; (name: 'hook', hook: Hook): boolean; (name: 'hook end', hook: Hook): boolean; (name: 'pass', test: Test): boolean; (name: 'fail', test: Test, err: any): boolean; (name: 'pending', test: Test): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'waiting', listener: (rootSuite: Suite) => void): this; (event: 'start', listener: () => void): this; (event: 'end', listener: () => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'suite end', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'test end', listener: (test: Test) => void): this; (event: 'hook', listener: (hook: Hook) => void): this; (event: 'hook end', listener: (hook: Hook) => void): this; (event: 'pass', listener: (test: Test) => void): this; (event: 'fail', listener: (test: Test, err: any) => void): this; (event: 'pending', listener: (test: Test) => void): this; (event: string, listener: (...args: any[]) => void): this;};
interface RunnerConstants
interface RunnerConstants {}
property EVENT_DELAY_BEGIN
readonly EVENT_DELAY_BEGIN: 'waiting';
property EVENT_DELAY_END
readonly EVENT_DELAY_END: 'ready';
property EVENT_HOOK_BEGIN
readonly EVENT_HOOK_BEGIN: 'hook';
property EVENT_HOOK_END
readonly EVENT_HOOK_END: 'hook end';
property EVENT_RUN_BEGIN
readonly EVENT_RUN_BEGIN: 'start';
property EVENT_RUN_END
readonly EVENT_RUN_END: 'end';
property EVENT_SUITE_BEGIN
readonly EVENT_SUITE_BEGIN: 'suite';
property EVENT_SUITE_END
readonly EVENT_SUITE_END: 'suite end';
property EVENT_TEST_BEGIN
readonly EVENT_TEST_BEGIN: 'test';
property EVENT_TEST_END
readonly EVENT_TEST_END: 'test end';
property EVENT_TEST_FAIL
readonly EVENT_TEST_FAIL: 'fail';
property EVENT_TEST_PASS
readonly EVENT_TEST_PASS: 'pass';
property EVENT_TEST_PENDING
readonly EVENT_TEST_PENDING: 'pending';
property EVENT_TEST_RETRY
readonly EVENT_TEST_RETRY: 'retry';
property STATE_IDLE
readonly STATE_IDLE: 'idle';
property STATE_RUNNING
readonly STATE_RUNNING: 'running';
property STATE_STOPPED
readonly STATE_STOPPED: 'stopped';
interface RunnerOptions
interface RunnerOptions {}
property cleanReferencesAfterRun
cleanReferencesAfterRun?: boolean;
Whether to clean references to test fns and hooks when a suite is done.
property delay
delay?: boolean;
Whether to delay execution of root suite until ready.
property dryRun
dryRun?: boolean;
Whether to report tests without running them.
interface Stats
interface Stats {}
Test statistics
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface Suite
interface Suite extends NodeJS.EventEmitter {}
method addListener
addListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method emit
emit: { (name: 'beforeAll', hook: Hook): boolean; (name: 'afterAll', hook: Hook): boolean; (name: 'beforeEach', hook: Hook): boolean; (name: 'afterEach', hook: Hook): boolean; (name: 'suite', suite: Suite): boolean; (name: 'test', test: Test): boolean; (name: 'run'): boolean; ( name: 'pre-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: 'require', module: any, file: string, mocha: Mocha): boolean; ( name: 'post-require', context: MochaGlobals, file: string, mocha: Mocha ): boolean; (name: string, ...args: any[]): boolean;};
method on
on: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method once
once: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependListener
prependListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method prependOnceListener
prependOnceListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
method removeListener
removeListener: { (event: 'beforeAll', listener: (hook: Hook) => void): this; (event: 'afterAll', listener: (hook: Hook) => void): this; (event: 'beforeEach', listener: (hook: Hook) => void): this; (event: 'afterEach', listener: (hook: Hook) => void): this; (event: 'suite', listener: (suite: Suite) => void): this; (event: 'test', listener: (test: Test) => void): this; (event: 'run', listener: () => void): this; ( event: 'pre-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; ( event: 'require', listener: (module: any, file: string, mocha: Mocha) => void ): this; ( event: 'post-require', listener: (context: MochaGlobals, file: string, mocha: Mocha) => void ): this; (event: string, listener: (...args: any[]) => void): this;};
interface SuiteConstants
interface SuiteConstants {}
property EVENT_FILE_POST_REQUIRE
readonly EVENT_FILE_POST_REQUIRE: 'post-require';
property EVENT_FILE_PRE_REQUIRE
readonly EVENT_FILE_PRE_REQUIRE: 'pre-require';
property EVENT_FILE_REQUIRE
readonly EVENT_FILE_REQUIRE: 'require';
property EVENT_ROOT_SUITE_RUN
readonly EVENT_ROOT_SUITE_RUN: 'run';
property EVENT_SUITE_ADD_HOOK_AFTER_ALL
readonly EVENT_SUITE_ADD_HOOK_AFTER_ALL: 'afterAll';
property EVENT_SUITE_ADD_HOOK_AFTER_EACH
readonly EVENT_SUITE_ADD_HOOK_AFTER_EACH: 'afterEach';
property EVENT_SUITE_ADD_HOOK_BEFORE_ALL
readonly EVENT_SUITE_ADD_HOOK_BEFORE_ALL: 'beforeAll';
property EVENT_SUITE_ADD_HOOK_BEFORE_EACH
readonly EVENT_SUITE_ADD_HOOK_BEFORE_EACH: 'beforeEach';
property EVENT_SUITE_ADD_SUITE
readonly EVENT_SUITE_ADD_SUITE: 'suite';
property EVENT_SUITE_ADD_TEST
readonly EVENT_SUITE_ADD_TEST: 'test';
property HOOK_TYPE_AFTER_ALL
readonly HOOK_TYPE_AFTER_ALL: 'afterAll';
property HOOK_TYPE_AFTER_EACH
readonly HOOK_TYPE_AFTER_EACH: 'afterEach';
property HOOK_TYPE_BEFORE_ALL
readonly HOOK_TYPE_BEFORE_ALL: 'beforeAll';
property HOOK_TYPE_BEFORE_EACH
readonly HOOK_TYPE_BEFORE_EACH: 'beforeEach';
interface SuiteFunction
interface SuiteFunction {}
property only
only: ExclusiveSuiteFunction;
[bdd, tdd, qunit] Indicates this suite should be executed exclusively.
- _Only available when invoked via the mocha CLI._
property skip
skip: PendingSuiteFunction;
[bdd, tdd] Indicates this suite should not be executed.
- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn: (this: Suite) => void): Suite;
[bdd, tdd] Describe a "suite" with the given
title
and callbackfn
containing nested suites.- _Only available when invoked via the mocha CLI._
call signature
(title: string): Suite;
[qunit] Describe a "suite" with the given
title
.- _Only available when invoked via the mocha CLI._
interface TestFunction
interface TestFunction {}
property only
only: ExclusiveTestFunction;
Indicates this test should be executed exclusively.
- _Only available when invoked via the mocha CLI._
property skip
skip: PendingTestFunction;
Indicates this test should not be executed.
- _Only available when invoked via the mocha CLI._
method retries
retries: (n: number) => void;
Number of attempts to retry.
- _Only available when invoked via the mocha CLI._
call signature
(fn: Func): Test;
Describe a specification or test-case with the given callback
fn
acting as a thunk. The name of the function is used as the name of the test.- _Only available when invoked via the mocha CLI._
call signature
(fn: AsyncFunc): Test;
Describe a specification or test-case with the given callback
fn
acting as a thunk. The name of the function is used as the name of the test.- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn?: Func): Test;
Describe a specification or test-case with the given
title
and callbackfn
acting as a thunk.- _Only available when invoked via the mocha CLI._
call signature
(title: string, fn?: AsyncFunc): Test;
Describe a specification or test-case with the given
title
and callbackfn
acting as a thunk.- _Only available when invoked via the mocha CLI._
type AsyncFunc
type AsyncFunc = (this: Context) => PromiseLike<any>;
Async callback function used for tests and hooks.
type Done
type Done = (err?: any) => void;
type Func
type Func = (this: Context, done: Done) => void;
Callback function used for tests and hooks.
type Interface
type Interface = keyof InterfaceContributions;
type Reporter
type Reporter = keyof ReporterContributions;
type TestInterface
type TestInterface = (suite: Suite) => void;
namespace mocha.interfaces
namespace mocha.interfaces {}
namespace Mocha.interfaces
namespace Mocha.interfaces {}
namespace mocha.reporters
namespace mocha.reporters {}
variable base
const base: typeof Base;
variable doc
const doc: typeof Doc;
variable dot
const dot: typeof Dot;
variable html
const html: typeof HTML;
variable json
const json: typeof JSON;
variable landing
const landing: typeof Landing;
variable list
const list: typeof List;
variable markdown
const markdown: typeof Markdown;
variable nyan
const nyan: typeof Nyan;
variable progress
const progress: typeof Progress;
variable spec
const spec: typeof Spec;
variable tap
const tap: typeof TAP;
variable xunit
const xunit: typeof XUnit;
class Base
class Base {}
Initialize a new
Base
reporter.All other reporters generally inherit from this reporter, providing stats such as test duration, number of tests passed / failed, etc.
See Also
https://mochajs.org/api/Mocha.reporters.Base.html
constructor
constructor(runner: Runner, options?: MochaOptions);
property consoleLog
static consoleLog: (...data: any[]) => void;
property failures
failures: Test[];
Test failures
property runner
runner: Runner;
The configured runner
property stats
stats: Stats;
Test run statistics
method done
done: (failures: number, fn?: (failures: number) => void) => void;
method epilogue
epilogue: () => void;
Output common epilogue used by many of the bundled reporters.
See Also
https://mochajs.org/api/Mocha.reporters.Base.html#.Base#epilogue
class Doc
class Doc extends Base {}
Initialize a new
Doc
reporter.See Also
https://mochajs.org/api/Mocha.reporters.Doc.html
class Dot
class Dot extends Base {}
Initialize a new
Dot
matrix test reporter.See Also
https://mochajs.org/api/Mocha.reporters.Dot.html
class HTML
class HTML extends Base {}
Initialize a new
HTML
reporter.- _This reporter cannot be used on the console._
See Also
https://mochajs.org/api/Mocha.reporters.HTML.html
method addCodeToggle
addCodeToggle: (el: HTMLLIElement, contents: string) => void;
Adds code toggle functionality for the provided test's list element.
See Also
https://mochajs.org/api/Mocha.reporters.HTML.html#addCodeToggle
method suiteURL
suiteURL: (suite: Suite) => string;
Provide suite URL.
See Also
https://mochajs.org/api/Mocha.reporters.HTML.html#suiteURL
method testURL
testURL: (test: Test) => string;
Provide test URL.
See Also
https://mochajs.org/api/Mocha.reporters.HTML.html#testURL
class JSON
class JSON extends Base {}
Initialize a new
JSON
reporterSee Also
https://mochajs.org/api/Mocha.reporters.JSON.html
class JSONStream
class JSONStream extends Base {}
Initialize a new
JSONStream
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.JSONStream.html
class Landing
class Landing extends Base {}
Initialize a new
Landing
reporter.See Also
https://mochajs.org/api/Mocha.reporters.Landing.html
class List
class List extends Base {}
Initialize a new
List
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.List.html
class Markdown
class Markdown extends Base {}
Initialize a new
Markdown
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.Markdown.html
class Min
class Min extends Base {}
Initialize a new
Min
minimal test reporter (best used with --watch).See Also
https://mochajs.org/api/Mocha.reporters.Min.html
class Nyan
class Nyan extends Base {}
Initialize a new
NyanCat
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.Nyan.html
class Progress
class Progress extends Base {}
Initialize a new
Progress
bar test reporter.See Also
https://mochajs.org/api/Mocha.reporters.Progress.html
constructor
constructor(runner: Runner, options?: Progress.MochaOptions);
class Spec
class Spec extends Base {}
Initialize a new
Spec
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.Spec.html
class TAP
class TAP extends Base {}
Initialize a new
TAP
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.TAP.html
class XUnit
class XUnit extends Base {}
Initialize a new
XUnit
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.XUnit.html
constructor
constructor(runner: Runner, options?: XUnit.MochaOptions);
method done
done: (failures: number, fn: (failures: number) => void) => void;
Override done to close the stream (if it's a file).
See Also
https://mochajs.org/api/Mocha.reporters.XUnit.html#done
method test
test: (test: Test) => void;
Output tag for the given
test.
See Also
https://mochajs.org/api/Mocha.reporters.XUnit.html#test
method write
write: (line: string) => void;
Write out the given line.
See Also
https://mochajs.org/api/Mocha.reporters.XUnit.html#write
namespace Mocha.reporters
namespace Mocha.reporters {}
variable base
const base: typeof Base;
variable doc
const doc: typeof Doc;
variable dot
const dot: typeof Dot;
variable html
const html: typeof HTML;
variable json
const json: typeof JSON;
variable landing
const landing: typeof Landing;
variable list
const list: typeof List;
variable markdown
const markdown: typeof Markdown;
variable nyan
const nyan: typeof Nyan;
variable progress
const progress: typeof Progress;
variable spec
const spec: typeof Spec;
variable tap
const tap: typeof TAP;
variable xunit
const xunit: typeof XUnit;
class Base
class Base {}
Initialize a new
Base
reporter.All other reporters generally inherit from this reporter, providing stats such as test duration, number of tests passed / failed, etc.
See Also
https://mochajs.org/api/Mocha.reporters.Base.html
constructor
constructor(runner: Runner, options?: MochaOptions);
property consoleLog
static consoleLog: (...data: any[]) => void;
property failures
failures: Test[];
Test failures
property runner
runner: Runner;
The configured runner
property stats
stats: Stats;
Test run statistics
method done
done: (failures: number, fn?: (failures: number) => void) => void;
method epilogue
epilogue: () => void;
Output common epilogue used by many of the bundled reporters.
See Also
https://mochajs.org/api/Mocha.reporters.Base.html#.Base#epilogue
class Doc
class Doc extends Base {}
Initialize a new
Doc
reporter.See Also
https://mochajs.org/api/Mocha.reporters.Doc.html
class Dot
class Dot extends Base {}
Initialize a new
Dot
matrix test reporter.See Also
https://mochajs.org/api/Mocha.reporters.Dot.html
class HTML
class HTML extends Base {}
Initialize a new
HTML
reporter.- _This reporter cannot be used on the console._
See Also
https://mochajs.org/api/Mocha.reporters.HTML.html
method addCodeToggle
addCodeToggle: (el: HTMLLIElement, contents: string) => void;
Adds code toggle functionality for the provided test's list element.
See Also
https://mochajs.org/api/Mocha.reporters.HTML.html#addCodeToggle
method suiteURL
suiteURL: (suite: Suite) => string;
Provide suite URL.
See Also
https://mochajs.org/api/Mocha.reporters.HTML.html#suiteURL
method testURL
testURL: (test: Test) => string;
Provide test URL.
See Also
https://mochajs.org/api/Mocha.reporters.HTML.html#testURL
class JSON
class JSON extends Base {}
Initialize a new
JSON
reporterSee Also
https://mochajs.org/api/Mocha.reporters.JSON.html
class JSONStream
class JSONStream extends Base {}
Initialize a new
JSONStream
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.JSONStream.html
class Landing
class Landing extends Base {}
Initialize a new
Landing
reporter.See Also
https://mochajs.org/api/Mocha.reporters.Landing.html
class List
class List extends Base {}
Initialize a new
List
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.List.html
class Markdown
class Markdown extends Base {}
Initialize a new
Markdown
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.Markdown.html
class Min
class Min extends Base {}
Initialize a new
Min
minimal test reporter (best used with --watch).See Also
https://mochajs.org/api/Mocha.reporters.Min.html
class Nyan
class Nyan extends Base {}
Initialize a new
NyanCat
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.Nyan.html
class Progress
class Progress extends Base {}
Initialize a new
Progress
bar test reporter.See Also
https://mochajs.org/api/Mocha.reporters.Progress.html
constructor
constructor(runner: Runner, options?: Progress.MochaOptions);
class Spec
class Spec extends Base {}
Initialize a new
Spec
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.Spec.html
class TAP
class TAP extends Base {}
Initialize a new
TAP
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.TAP.html
class XUnit
class XUnit extends Base {}
Initialize a new
XUnit
test reporter.See Also
https://mochajs.org/api/Mocha.reporters.XUnit.html
constructor
constructor(runner: Runner, options?: XUnit.MochaOptions);
method done
done: (failures: number, fn: (failures: number) => void) => void;
Override done to close the stream (if it's a file).
See Also
https://mochajs.org/api/Mocha.reporters.XUnit.html#done
method test
test: (test: Test) => void;
Output tag for the given
test.
See Also
https://mochajs.org/api/Mocha.reporters.XUnit.html#test
method write
write: (line: string) => void;
Write out the given line.
See Also
https://mochajs.org/api/Mocha.reporters.XUnit.html#write
namespace mocha.reporters.Base
namespace mocha.reporters.Base {}
variable colors
const colors: ColorMap;
Default color map
See Also
https://mochajs.org/api/module-base#.colors
variable inlineDiffs
let inlineDiffs: boolean;
Inline diffs instead of +/-
See Also
https://mochajs.org/api/module-base#.inlineDiffs
variable symbols
const symbols: SymbolMap;
Default symbol map
See Also
https://mochajs.org/api/module-base#.symbols
variable useColors
let useColors: boolean;
Enables coloring by default
See Also
https://mochajs.org/api/module-base#.useColors
variable window
const window: { width: number };
Expose terminal window size
See Also
https://mochajs.org/api/module-base#.window
function color
color: (type: string, str: string) => string;
Color
str
with the giventype
(fromcolors
)See Also
https://mochajs.org/api/module-base#.color
function generateDiff
generateDiff: (actual: string, expected: string) => string;
Returns a diff between two strings with colored ANSI output.
See Also
https://mochajs.org/api/module-base#.generateDiff
function list
list: (failures: Test[]) => void;
Output the given
failures
as a list.See Also
https://mochajs.org/api/Mocha.reporters.Base.html#.exports.list1
interface ColorMap
interface ColorMap {}
Default color map
See Also
https://mochajs.org/api/module-base#.colors
property "bright fail"
'bright fail': number;
property "bright pass"
'bright pass': number;
property "bright yellow"
'bright yellow': number;
property "diff added"
'diff added': number;
property "diff gutter"
'diff gutter': number;
property "diff removed"
'diff removed': number;
property "error message"
'error message': number;
property "error stack"
'error stack': number;
property "error title"
'error title': number;
property "plane crash"
'plane crash': number;
property checkmark
checkmark: number;
property fail
fail: number;
property fast
fast: number;
property green
green: number;
property light
light: number;
property medium
medium: number;
property pass
pass: number;
property pending
pending: number;
property plane
plane: number;
property progress
progress: number;
property runway
runway: number;
property slow
slow: number;
property suite
suite: number;
index signature
[key: string]: number;
namespace Mocha.reporters.Base
namespace Mocha.reporters.Base {}
variable colors
const colors: ColorMap;
Default color map
See Also
https://mochajs.org/api/module-base#.colors
variable inlineDiffs
let inlineDiffs: boolean;
Inline diffs instead of +/-
See Also
https://mochajs.org/api/module-base#.inlineDiffs
variable symbols
const symbols: SymbolMap;
Default symbol map
See Also
https://mochajs.org/api/module-base#.symbols
variable useColors
let useColors: boolean;
Enables coloring by default
See Also
https://mochajs.org/api/module-base#.useColors
variable window
const window: { width: number };
Expose terminal window size
See Also
https://mochajs.org/api/module-base#.window
function color
color: (type: string, str: string) => string;
Color
str
with the giventype
(fromcolors
)See Also
https://mochajs.org/api/module-base#.color
function generateDiff
generateDiff: (actual: string, expected: string) => string;
Returns a diff between two strings with colored ANSI output.
See Also
https://mochajs.org/api/module-base#.generateDiff
function list
list: (failures: Test[]) => void;
Output the given
failures
as a list.See Also
https://mochajs.org/api/Mocha.reporters.Base.html#.exports.list1
interface ColorMap
interface ColorMap {}
Default color map
See Also
https://mochajs.org/api/module-base#.colors
property "bright fail"
'bright fail': number;
property "bright pass"
'bright pass': number;
property "bright yellow"
'bright yellow': number;
property "diff added"
'diff added': number;
property "diff gutter"
'diff gutter': number;
property "diff removed"
'diff removed': number;
property "error message"
'error message': number;
property "error stack"
'error stack': number;
property "error title"
'error title': number;
property "plane crash"
'plane crash': number;
property checkmark
checkmark: number;
property fail
fail: number;
property fast
fast: number;
property green
green: number;
property light
light: number;
property medium
medium: number;
property pass
pass: number;
property pending
pending: number;
property plane
plane: number;
property progress
progress: number;
property runway
runway: number;
property slow
slow: number;
property suite
suite: number;
index signature
[key: string]: number;
namespace mocha.reporters.Base.cursor
namespace mocha.reporters.Base.cursor {}
ANSI TTY control sequences common among reporters.
See Also
https://mochajs.org/api/module-base#.cursor
function beginningOfLine
beginningOfLine: () => void;
Moves to the beginning of the line
function CR
CR: () => void;
Clears the line and moves to the beginning of the line.
function deleteLine
deleteLine: () => void;
Deletes the current line
function hide
hide: () => void;
Hides the cursor
function show
show: () => void;
Shows the cursor
namespace Mocha.reporters.Base.cursor
namespace Mocha.reporters.Base.cursor {}
ANSI TTY control sequences common among reporters.
See Also
https://mochajs.org/api/module-base#.cursor
function beginningOfLine
beginningOfLine: () => void;
Moves to the beginning of the line
function CR
CR: () => void;
Clears the line and moves to the beginning of the line.
function deleteLine
deleteLine: () => void;
Deletes the current line
function hide
hide: () => void;
Hides the cursor
function show
show: () => void;
Shows the cursor
namespace mocha.reporters.Progress
namespace mocha.reporters.Progress {}
interface MochaOptions
interface MochaOptions extends Mocha.MochaOptions {}
property reporterOptions
reporterOptions?: ReporterOptions | undefined;
interface ReporterOptions
interface ReporterOptions {}
property close
close?: string | undefined;
property complete
complete?: string | undefined;
property incomplete
incomplete?: string | undefined;
property open
open?: string | undefined;
property verbose
verbose?: boolean | undefined;
namespace Mocha.reporters.Progress
namespace Mocha.reporters.Progress {}
interface MochaOptions
interface MochaOptions extends Mocha.MochaOptions {}
property reporterOptions
reporterOptions?: ReporterOptions | undefined;
interface ReporterOptions
interface ReporterOptions {}
property close
close?: string | undefined;
property complete
complete?: string | undefined;
property incomplete
incomplete?: string | undefined;
property open
open?: string | undefined;
property verbose
verbose?: boolean | undefined;
namespace mocha.reporters.XUnit
namespace mocha.reporters.XUnit {}
interface MochaOptions
interface MochaOptions extends Mocha.MochaOptions {}
property reporterOptions
reporterOptions?: ReporterOptions | undefined;
interface ReporterOptions
interface ReporterOptions {}
namespace Mocha.reporters.XUnit
namespace Mocha.reporters.XUnit {}
interface MochaOptions
interface MochaOptions extends Mocha.MochaOptions {}
property reporterOptions
reporterOptions?: ReporterOptions | undefined;
interface ReporterOptions
interface ReporterOptions {}
namespace mocha.utils
namespace mocha.utils {}
function canonicalize
canonicalize: (value: any, stack: any[], typeHint: string) => any;
Return a new Thing that has the keys in sorted order. Recursive.
If the Thing... - has already been seen, return string
'[Circular]'
- isundefined
, return string'[undefined]'
- isnull
, return valuenull
- is some other primitive, return the value - is not a primitive or anArray
,Object
, orFunction
, return the value of the Thing'stoString()
method - is a non-emptyArray
,Object
, orFunction
, return the result of calling this function again. - is an emptyArray
,Object
, orFunction
, returns'[]'
,'{}'
, or'[Function]'
respectively.See Also
https://mochajs.org/api/module-utils.html#.canonicalize
function clean
clean: (str: string) => string;
Strip the function definition from
str
, and re-indent for pre whitespace.See Also
https://mochajs.org/api/module-utils.html#.clean
function getError
getError: (err: Error | undefined) => Error;
Generate an undefined error if
err
is not defined.See Also
https://mochajs.org/api/module-utils.html#.getError
function highlight
highlight: (js: string) => string;
Highlight the given string of
js
.
function slug
slug: (str: string) => string;
Compute a slug from the given
str
.See Also
https://mochajs.org/api/module-utils.html#.slug
function stackTraceFilter
stackTraceFilter: () => (stack: string) => string;
When invoking this function you get a filter function that get the Error.stack as an input, and return a prettify output. (i.e: strip Mocha and internal node functions from stack trace).
See Also
https://mochajs.org/api/module-utils.html#.stackTraceFilter
function stringify
stringify: (value: any) => string;
Stringify
value
. Different behavior depending on type of value:- If
value
is undefined or null, return'[undefined]'
or'[null]'
, respectively. - Ifvalue
is not an object, function or array, return result ofvalue.toString()
wrapped in double-quotes. - Ifvalue
is an *empty* object, function, or array, returns'{}'
,'[Function]'
, or'[]'
respectively. - Ifvalue
has properties, call canonicalize} on it, then return result ofJSON.stringify()
See Also
https://mochajs.org/api/module-utils.html#.stringify
function type
type: (value: any) => string;
Takes some variable and asks
Object.prototype.toString()
what it thinks it is.
function undefinedError
undefinedError: () => Error;
Generate an undefined error with a message warning the user.
See Also
https://mochajs.org/api/module-utils.html#.undefinedError
namespace Mocha.utils
namespace Mocha.utils {}
function canonicalize
canonicalize: (value: any, stack: any[], typeHint: string) => any;
Return a new Thing that has the keys in sorted order. Recursive.
If the Thing... - has already been seen, return string
'[Circular]'
- isundefined
, return string'[undefined]'
- isnull
, return valuenull
- is some other primitive, return the value - is not a primitive or anArray
,Object
, orFunction
, return the value of the Thing'stoString()
method - is a non-emptyArray
,Object
, orFunction
, return the result of calling this function again. - is an emptyArray
,Object
, orFunction
, returns'[]'
,'{}'
, or'[Function]'
respectively.See Also
https://mochajs.org/api/module-utils.html#.canonicalize
function clean
clean: (str: string) => string;
Strip the function definition from
str
, and re-indent for pre whitespace.See Also
https://mochajs.org/api/module-utils.html#.clean
function getError
getError: (err: Error | undefined) => Error;
Generate an undefined error if
err
is not defined.See Also
https://mochajs.org/api/module-utils.html#.getError
function highlight
highlight: (js: string) => string;
Highlight the given string of
js
.
function slug
slug: (str: string) => string;
Compute a slug from the given
str
.See Also
https://mochajs.org/api/module-utils.html#.slug
function stackTraceFilter
stackTraceFilter: () => (stack: string) => string;
When invoking this function you get a filter function that get the Error.stack as an input, and return a prettify output. (i.e: strip Mocha and internal node functions from stack trace).
See Also
https://mochajs.org/api/module-utils.html#.stackTraceFilter
function stringify
stringify: (value: any) => string;
Stringify
value
. Different behavior depending on type of value:- If
value
is undefined or null, return'[undefined]'
or'[null]'
, respectively. - Ifvalue
is not an object, function or array, return result ofvalue.toString()
wrapped in double-quotes. - Ifvalue
is an *empty* object, function, or array, returns'{}'
,'[Function]'
, or'[]'
respectively. - Ifvalue
has properties, call canonicalize} on it, then return result ofJSON.stringify()
See Also
https://mochajs.org/api/module-utils.html#.stringify
function type
type: (value: any) => string;
Takes some variable and asks
Object.prototype.toString()
what it thinks it is.
function undefinedError
undefinedError: () => Error;
Generate an undefined error with a message warning the user.
See Also
https://mochajs.org/api/module-utils.html#.undefinedError
namespace mocha/lib/interfaces/common
module 'mocha/lib/interfaces/common' {}
function common
common: ( suites: Mocha.Suite[], context: Mocha.MochaGlobals, mocha: Mocha) => common.CommonFunctions;
interface CommonFunctions
interface CommonFunctions {}
property suite
suite: SuiteFunctions;
property test
test: TestFunctions;
method after
after: { (fn?: Mocha.Func | Mocha.AsyncFunc): void; (name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void;};
Execute after running tests.
method afterEach
afterEach: { (fn?: Mocha.Func | Mocha.AsyncFunc): void; (name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void;};
Execute after each test case.
method before
before: { (fn?: Mocha.Func | Mocha.AsyncFunc): void; (name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void;};
Execute before running tests.
method beforeEach
beforeEach: { (fn?: Mocha.Func | Mocha.AsyncFunc): void; (name: string, fn?: Mocha.Func | Mocha.AsyncFunc): void;};
Execute before each test case.
method runWithSuite
runWithSuite: (suite: Mocha.Suite) => () => void;
This is only present if flag --delay is passed into Mocha. It triggers root suite execution.
interface CreateOptions
interface CreateOptions {}
property file
file?: string | undefined;
Filepath where this Suite resides
property fn
fn?: ((this: Mocha.Suite) => void) | undefined;
Suite function
property isOnly
isOnly?: boolean | undefined;
Is suite exclusive?
property pending
pending?: boolean | undefined;
Is suite pending?
property title
title: string;
Title of suite
interface SuiteFunctions
interface SuiteFunctions {}
interface TestFunctions
interface TestFunctions {}
namespace mocha/lib/stats-collector
module 'mocha/lib/stats-collector' {}
function createStatsCollector
createStatsCollector: (runner: Mocha.Runner) => void;
Provides stats such as test duration, number of tests passed / failed etc., by listening for events emitted by
runner
.
namespace NodeJS
namespace NodeJS {}
interface EventEmitter
interface EventEmitter {}
interface Global
interface Global extends Mocha.MochaGlobals {}
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/mocha
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/mocha)
- HTML<a href="https://www.jsdocs.io/package/@types/mocha"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 17154 ms. - Missing or incorrect documentation? Open an issue for this package.