Home / Type/ MockFunction Type — react Architecture

MockFunction Type — react Architecture

Architecture documentation for the MockFunction type/interface in jest.d.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  97f87020_8699_c44a_0548_e503957149e3["MockFunction"]
  b1756f3e_1ac5_9273_3afa_eb918ea11234["jest.d.ts"]
  97f87020_8699_c44a_0548_e503957149e3 -->|defined in| b1756f3e_1ac5_9273_3afa_eb918ea11234
  style 97f87020_8699_c44a_0548_e503957149e3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/jest/typescript/jest.d.ts lines 57–69

interface MockFunction {
  (...arguments): any;
  mock: {
    calls: Array<Array<any>>;
    instances: Array<Object>;
  };
  mockClear(): void;
  mockImplementation(fn: Function): MockFunction;
  mockImpl(fn: Function): MockFunction;
  mockReturnThis(): MockFunction;
  mockReturnValue(value: any): MockFunction;
  mockReturnValueOnce(value: any): MockFunction;
}

Frequently Asked Questions

What is the MockFunction type?
MockFunction is a type/interface in the react codebase, defined in scripts/jest/typescript/jest.d.ts.
Where is MockFunction defined?
MockFunction is defined in scripts/jest/typescript/jest.d.ts at line 57.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free