Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Context

Hierarchy

  • Context

Indexable

[key: string]: any

Test context

Index

Properties

Optional currentTest

currentTest: Test

Optional test

test: Runnable

Methods

enableTimeouts

  • enableTimeouts(): boolean
  • enableTimeouts(enabled: boolean): this
  • Get whether timeouts are enabled.

    Returns boolean

  • Set whether timeouts are enabled.

    Parameters

    • enabled: boolean

    Returns this

retries

  • retries(): number
  • retries(n: number): this
  • Get the number of allowed retries on failed tests.

    Returns number

  • Set the number of allowed retries on failed tests.

    Parameters

    • n: number

    Returns this

runnable

  • Get the context Runnable.

    Returns Runnable

  • Set the context Runnable.

    Parameters

    Returns this

  • deprecated

    Use the overload that accepts Mocha.Runnable instead.

    Parameters

    Returns this

skip

  • skip(): never
  • Mark a test as skipped.

    Returns never

slow

  • slow(): number
  • slow(ms: string | number): this
  • Get test slowness threshold.

    Returns number

  • Set test slowness threshold.

    Parameters

    • ms: string | number

    Returns this

timeout

  • timeout(): number
  • timeout(ms: string | number): this
  • Get test timeout.

    Returns number

  • Set test timeout.

    Parameters

    • ms: string | number

    Returns this

Generated using TypeDoc