Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T

  • Y: Array<unknown>

Hierarchy

Index

Properties

_isMockFunction

_isMockFunction: true

_protoImpl

_protoImpl: Function

mock

mock: MockFunctionState<T, Y>

Methods

getMockImplementation

  • getMockImplementation(): Function | undefined
  • Returns Function | undefined

getMockName

  • getMockName(): string
  • Returns string

mockClear

  • mockClear(): this
  • Returns this

mockImplementation

  • mockImplementation(fn: function): this
  • mockImplementation(fn: function): this
  • Parameters

    • fn: function
        • (...args: Y): T
        • Parameters

          • Rest ...args: Y

          Returns T

    Returns this

  • Parameters

    • fn: function
        • (): Promise<T>
        • Returns Promise<T>

    Returns this

mockImplementationOnce

  • mockImplementationOnce(fn: function): this
  • mockImplementationOnce(fn: function): this
  • Parameters

    • fn: function
        • (...args: Y): T
        • Parameters

          • Rest ...args: Y

          Returns T

    Returns this

  • Parameters

    • fn: function
        • (): Promise<T>
        • Returns Promise<T>

    Returns this

mockName

  • mockName(name: string): this
  • Parameters

    • name: string

    Returns this

mockRejectedValue

  • mockRejectedValue(value: T): this
  • Parameters

    • value: T

    Returns this

mockRejectedValueOnce

  • mockRejectedValueOnce(value: T): this
  • Parameters

    • value: T

    Returns this

mockReset

  • mockReset(): this
  • Returns this

mockResolvedValue

  • mockResolvedValue(value: T): this
  • Parameters

    • value: T

    Returns this

mockResolvedValueOnce

  • mockResolvedValueOnce(value: T): this
  • Parameters

    • value: T

    Returns this

mockRestore

  • mockRestore(): void
  • Returns void

mockReturnThis

  • mockReturnThis(): this
  • Returns this

mockReturnValue

  • mockReturnValue(value: T): this
  • Parameters

    • value: T

    Returns this

mockReturnValueOnce

  • mockReturnValueOnce(value: T): this
  • Parameters

    • value: T

    Returns this

Generated using TypeDoc