Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "node_modules/jest-mock/build/index.d"

Index

Type aliases

FunctionPropertyNames

FunctionPropertyNames: { [K in keyof T]: T[K] extends (...args: any[]) => any ? K : never; }[keyof T] & string

Global

Global: Global

Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

MockFunctionResult

MockFunctionResult: object

Represents the result of a single call to a mock function.

Type declaration

  • type: MockFunctionResultType

    Indicates how the call completed.

  • value: unknown

    The value that was either thrown or returned by the function. Undefined when type === 'incomplete'.

MockFunctionResultType

MockFunctionResultType: "return" | "throw" | "incomplete"

Possible types of a MockFunctionResult. 'return': The call completed by returning normally. 'throw': The call completed by throwing a value. 'incomplete': The call has not completed yet. This is possible if you read the mock function result from within the mock function itself (or a function called by the mock function).

MockFunctionState

MockFunctionState: object

Type declaration

  • calls: Array<Y>
  • instances: Array<T>
  • invocationCallOrder: Array<number>
  • results: Array<MockFunctionResult>

    List of results of calls to the mock function.

NonFunctionPropertyNames

NonFunctionPropertyNames: { [K in keyof T]: T[K] extends (...args: any[]) => any ? never : K; }[keyof T] & string

Generated using TypeDoc