MCPcopy
hub / github.com/jestjs/jest / mockImplementation

Method mockImplementation

packages/jest-mock/src/index.ts:146–146  ·  view source on GitHub ↗
(fn: T)

Source from the content-addressed store, hash-verified

144 mockReset(): this;
145 mockRestore(): void;
146 mockImplementation(fn: T): this;
147 mockImplementationOnce(fn: T): this;
148 withImplementation(fn: T, callback: () => Promise<unknown>): Promise<void>;
149 withImplementation(fn: T, callback: () => void): void;

Callers 15

args.test.tsFile · 0.80
normalize.test.tsFile · 0.80
runJest.test.jsFile · 0.80
watch.test.jsFile · 0.80
forcePosixFunction · 0.80
forceWindowsFunction · 0.80

Calls

no outgoing calls

Tested by 3

forcePosixFunction · 0.64
forceWindowsFunction · 0.64
defineTestsFunction · 0.64