Vitest · Method
vi.isMockFunction
vi.isMockFunction checks whether a value is a Vitest mock function. In TypeScript, a successful check narrows the value to Mock.
Last updated
Syntax
function isMockFunction ( fn: unknown ): asserts fn is MockIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
vi.fnvi.spyOnvi.clearAllMocksvi.resetAllMocks