Skip to content

Function: replaceFunctionMockOnce() ​

ts
function replaceFunctionMockOnce(callable: AnyCallable, newImplementation: AnyCallable): void;

Replace a jest mock function implementation for a single call.

Parameters ​

ParameterTypeDescription
callableAnyCallableFunction expected to be a jest mock.
newImplementationAnyCallableNew implementation to use once.

Returns ​

void