Skip to content

Function: replaceFunctionMock() ​

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

Replace a jest mock function implementation.

Parameters ​

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

Returns ​

void