Initialize a new `Test` with the given `title` and callback `fn`.

see

  https://mochajs.org/api/Test.html

### Hierarchy

- Runnable
  - Test

## Index

### Constructors

- constructor

### Properties

- allowUncaught
- async
- body
- callback
- ctx
- duration
- err
- file
- fn
- parent
- pending
- speed
- state
- sync
- timedOut
- timer
- title
- type

### Methods

- addListener
- clearTimeout
- clone
- currentRetry
- emit
- enableTimeouts
- eventNames
- fullTitle
- getMaxListeners
- globals
- inspect
- isFailed
- isPassed
- isPending
- listenerCount
- listeners
- off
- on
- once
- prependListener
- prependOnceListener
- rawListeners
- removeAllListeners
- removeListener
- resetTimeout
- retries
- run
- setMaxListeners
- skip
- slow
- timeout
- titlePath

## Constructors

### constructor

- new Test(title: string, fn?: Func | AsyncFunc): Test

- Inherited from Runnable.constructor

  - Defined in node_modules/@types/mocha/index.d.ts:1091

  #### Parameters

  - ##### title: string

  - ##### Optional fn: Func | AsyncFunc

  #### Returns Test

## Properties

### Optional allowUncaught

allowUncaught: undefined | false | true

Inherited from Runnable.allowUncaught

- Defined in node_modules/@types/mocha/index.d.ts:1108

### async

async: boolean

Inherited from Runnable.async

- Defined in node_modules/@types/mocha/index.d.ts:1098

### body

body: string

Inherited from Runnable.body

- Defined in node_modules/@types/mocha/index.d.ts:1097

### Optional callback

callback: Done

Inherited from Runnable.callback

- Defined in node_modules/@types/mocha/index.d.ts:1107

### Optional ctx

ctx: Context

Inherited from Runnable.ctx

- Defined in node_modules/@types/mocha/index.d.ts:1106

### Optional duration

duration: undefined | number

Inherited from Runnable.duration

- Defined in node_modules/@types/mocha/index.d.ts:1102

### Optional err

err: Error

- Defined in node_modules/@types/mocha/index.d.ts:2143

### Optional file

file: undefined | string

Inherited from Runnable.file

- Defined in node_modules/@types/mocha/index.d.ts:1109

### fn

fn: Func | AsyncFunc | undefined

Inherited from Runnable.fn

- Defined in node_modules/@types/mocha/index.d.ts:1096

### Optional parent

parent: Suite

Inherited from Runnable.parent

- Defined in node_modules/@types/mocha/index.d.ts:1103

### pending

pending: boolean

Inherited from Runnable.pending

- Defined in node_modules/@types/mocha/index.d.ts:1101

### Optional speed

speed: "slow" | "medium" | "fast"

- Defined in node_modules/@types/mocha/index.d.ts:2142

### Optional state

state: "failed" | "passed"

Inherited from Runnable.state

- Defined in node_modules/@types/mocha/index.d.ts:1104

### sync

sync: boolean

Inherited from Runnable.sync

- Defined in node_modules/@types/mocha/index.d.ts:1099

### timedOut

timedOut: boolean

Inherited from Runnable.timedOut

- Defined in node_modules/@types/mocha/index.d.ts:1100

### Optional timer

timer: any

Inherited from Runnable.timer

- Defined in node_modules/@types/mocha/index.d.ts:1105

### title

title: string

Inherited from Runnable.title

- Defined in node_modules/@types/mocha/index.d.ts:1095

### type

type: "test"

- Defined in node_modules/@types/mocha/index.d.ts:2141

## Methods

### addListener

- addListener(event: "error", listener: function): this

- Inherited from Runnable.addListener

  Overrides EventEmitter.addListener

  - Defined in node_modules/@types/mocha/index.d.ts:1260

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (error: any): void

      - #### Parameters

        - ##### error: any

        #### Returns void

  #### Returns this

### clearTimeout

- clearTimeout(): void

- Inherited from Runnable.clearTimeout

  - Defined in node_modules/@types/mocha/index.d.ts:1218

  Clear the timeout.

  see

    https://mochajs.org/api/Runnable.html#clearTimeout

  #### Returns void

### clone

- clone(): Test

- - Defined in node_modules/@types/mocha/index.d.ts:2144

  #### Returns Test

### Protected currentRetry

- currentRetry(): number
- currentRetry(n: number): void

- Inherited from Runnable.currentRetry

  - Defined in node_modules/@types/mocha/index.d.ts:1194

  Set or get current retry

  see

    https://mochajs.org/api/Runnable.html#currentRetry

  #### Returns number

- Inherited from Runnable.currentRetry

  - Defined in node_modules/@types/mocha/index.d.ts:1201

  Set or get current retry

  see

    https://mochajs.org/api/Runnable.html#currentRetry

  #### Parameters

  - ##### n: number

  #### Returns void

### emit

- emit(name: "error", error: any): boolean

- Inherited from Runnable.emit

  Overrides EventEmitter.emit

  - Defined in node_modules/@types/mocha/index.d.ts:1264

  #### Parameters

  - ##### name: "error"

  - ##### error: any

  #### Returns boolean

### enableTimeouts

- enableTimeouts(): boolean
- enableTimeouts(enabled: boolean): this

- Inherited from Runnable.enableTimeouts

  - Defined in node_modules/@types/mocha/index.d.ts:1144

  Get whether timeouts are enabled.

  see

    https://mochajs.org/api/Runnable.html#enableTimeouts

  #### Returns boolean

- Inherited from Runnable.enableTimeouts

  - Defined in node_modules/@types/mocha/index.d.ts:1151

  Set whether timeouts are enabled.

  see

    https://mochajs.org/api/Runnable.html#enableTimeouts

  #### Parameters

  - ##### enabled: boolean

  #### Returns this

### eventNames

- eventNames(): Array<string | symbol>

- Inherited from EventEmitter.eventNames

  Overrides EventEmitter.eventNames

  - Defined in node_modules/@types/node/globals.d.ts:594

  #### Returns Array<string | symbol>

### fullTitle

- fullTitle(): string

- Inherited from Runnable.fullTitle

  - Defined in node_modules/@types/mocha/index.d.ts:1206

  Return the full title generated by recursively concatenating the parent's full title.

  #### Returns string

### getMaxListeners

- getMaxListeners(): number

- Inherited from EventEmitter.getMaxListeners

  Overrides EventEmitter.getMaxListeners

  - Defined in node_modules/@types/node/globals.d.ts:586

  #### Returns number

### globals

- globals(): string[]
- globals(globals: ReadonlyArray<string>): void

- Inherited from Runnable.globals

  - Defined in node_modules/@types/mocha/index.d.ts:1239

  Get a list of whitelisted globals for this test run.

  see

    https://mochajs.org/api/Runnable.html#globals

  #### Returns string[]

- Inherited from Runnable.globals

  - Defined in node_modules/@types/mocha/index.d.ts:1246

  Set a list of whitelisted globals for this test run.

  see

    https://mochajs.org/api/Runnable.html#globals

  #### Parameters

  - ##### globals: ReadonlyArray<string>

  #### Returns void

### inspect

- inspect(): string

- Inherited from Runnable.inspect

  - Defined in node_modules/@types/mocha/index.d.ts:1225

  Inspect the runnable void of private properties.

  see

    https://mochajs.org/api/Runnable.html#inspect

  #### Returns string

### isFailed

- isFailed(): boolean

- Inherited from Runnable.isFailed

  - Defined in node_modules/@types/mocha/index.d.ts:1168

  Return `true` if this Runnable has failed.

  #### Returns boolean

### isPassed

- isPassed(): boolean

- Inherited from Runnable.isPassed

  - Defined in node_modules/@types/mocha/index.d.ts:1173

  Return `true` if this Runnable has passed.

  #### Returns boolean

### isPending

- isPending(): boolean

- Inherited from Runnable.isPending

  - Defined in node_modules/@types/mocha/index.d.ts:1163

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

  see

    https://mochajs.org/api/Runnable.html#isPending

  #### Returns boolean

### listenerCount

- listenerCount(type: string | symbol): number

- Inherited from EventEmitter.listenerCount

  Overrides EventEmitter.listenerCount

  - Defined in node_modules/@types/node/globals.d.ts:590

  #### Parameters

  - ##### type: string | symbol

  #### Returns number

### listeners

- listeners(event: string | symbol): Function[]

- Inherited from EventEmitter.listeners

  Overrides EventEmitter.listeners

  - Defined in node_modules/@types/node/globals.d.ts:587

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### off

- off(event: string | symbol, listener: function): this

- Inherited from EventEmitter.off

  Overrides EventEmitter.off

  - Defined in node_modules/@types/node/globals.d.ts:583

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### on

- on(event: "error", listener: function): this

- Inherited from Runnable.on

  Overrides EventEmitter.on

  - Defined in node_modules/@types/mocha/index.d.ts:1258

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (error: any): void

      - #### Parameters

        - ##### error: any

        #### Returns void

  #### Returns this

### once

- once(event: "error", listener: function): this

- Inherited from Runnable.once

  Overrides EventEmitter.once

  - Defined in node_modules/@types/mocha/index.d.ts:1259

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (error: any): void

      - #### Parameters

        - ##### error: any

        #### Returns void

  #### Returns this

### prependListener

- prependListener(event: "error", listener: function): this

- Inherited from Runnable.prependListener

  Overrides EventEmitter.prependListener

  - Defined in node_modules/@types/mocha/index.d.ts:1262

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (error: any): void

      - #### Parameters

        - ##### error: any

        #### Returns void

  #### Returns this

### prependOnceListener

- prependOnceListener(event: "error", listener: function): this

- Inherited from Runnable.prependOnceListener

  Overrides EventEmitter.prependOnceListener

  - Defined in node_modules/@types/mocha/index.d.ts:1263

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (error: any): void

      - #### Parameters

        - ##### error: any

        #### Returns void

  #### Returns this

### rawListeners

- rawListeners(event: string | symbol): Function[]

- Inherited from EventEmitter.rawListeners

  Overrides EventEmitter.rawListeners

  - Defined in node_modules/@types/node/globals.d.ts:588

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### removeAllListeners

- removeAllListeners(event?: string | symbol): this

- Inherited from EventEmitter.removeAllListeners

  Overrides EventEmitter.removeAllListeners

  - Defined in node_modules/@types/node/globals.d.ts:584

  #### Parameters

  - ##### Optional event: string | symbol

  #### Returns this

### removeListener

- removeListener(event: "error", listener: function): this

- Inherited from Runnable.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/mocha/index.d.ts:1261

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (error: any): void

      - #### Parameters

        - ##### error: any

        #### Returns void

  #### Returns this

### resetTimeout

- resetTimeout(): void

- Inherited from Runnable.resetTimeout

  - Defined in node_modules/@types/mocha/index.d.ts:1232

  Reset the timeout.

  see

    https://mochajs.org/api/Runnable.html#resetTimeout

  #### Returns void

### retries

- retries(): number
- retries(n: number): void

- Inherited from Runnable.retries

  - Defined in node_modules/@types/mocha/index.d.ts:1180

  Set or get number of retries.

  see

    https://mochajs.org/api/Runnable.html#retries

  #### Returns number

- Inherited from Runnable.retries

  - Defined in node_modules/@types/mocha/index.d.ts:1187

  Set or get number of retries.

  see

    https://mochajs.org/api/Runnable.html#retries

  #### Parameters

  - ##### n: number

  #### Returns void

### run

- run(fn: Done): void

- Inherited from Runnable.run

  - Defined in node_modules/@types/mocha/index.d.ts:1253

  Run the test and invoke `fn(err)`.

  see

    https://mochajs.org/api/Runnable.html#run

  #### Parameters

  - ##### fn: Done

  #### Returns void

### setMaxListeners

- setMaxListeners(n: number): this

- Inherited from EventEmitter.setMaxListeners

  Overrides EventEmitter.setMaxListeners

  - Defined in node_modules/@types/node/globals.d.ts:585

  #### Parameters

  - ##### n: number

  #### Returns this

### skip

- skip(): never

- Inherited from Runnable.skip

  - Defined in node_modules/@types/mocha/index.d.ts:1156

  Halt and mark as pending.

  #### Returns never

### slow

- slow(): number
- slow(ms: string | number): this

- Inherited from Runnable.slow

  - Defined in node_modules/@types/mocha/index.d.ts:1130

  Get test slowness threshold.

  see

    https://mochajs.org/api/Runnable.html#slow

  #### Returns number

- Inherited from Runnable.slow

  - Defined in node_modules/@types/mocha/index.d.ts:1137

  Set test slowness threshold.

  see

    https://mochajs.org/api/Runnable.html#slow

  #### Parameters

  - ##### ms: string | number

  #### Returns this

### timeout

- timeout(): number
- timeout(ms: string | number): this

- Inherited from Runnable.timeout

  - Defined in node_modules/@types/mocha/index.d.ts:1116

  Get test timeout.

  see

    https://mochajs.org/api/Runnable.html#timeout

  #### Returns number

- Inherited from Runnable.timeout

  - Defined in node_modules/@types/mocha/index.d.ts:1123

  Set test timeout.

  see

    https://mochajs.org/api/Runnable.html#timeout

  #### Parameters

  - ##### ms: string | number

  #### Returns this

### titlePath

- titlePath(): string[]

- Inherited from Runnable.titlePath

  - Defined in node_modules/@types/mocha/index.d.ts:1211

  Return the title path generated by concatenating the parent's title path with the title.

  #### Returns string[]

Generated using TypeDoc