FspyOn
Bun

function

test.jest.spyOn

function spyOn<T extends object, K extends string | number | symbol>(
obj: T,
methodOrPropertyValue: K
): Mock<Extract<T[K], (...args: any[]) => any>>;

Referenced types

type Mock<T extends (...args: any[]) => any = (...args: any[]) => any> = JestMock.Mock<T>

Constructs the type of a mock function, e.g. the return type of jest.fn().