mockImplementation<T, K, F>
Spies on a method and replaces it with an implementation that receives originalImplementation as its first argument, followed by the real call arguments.
Import:
import { mockImplementation } from '@mnaoumov/typescript-test-toolkit/mock-implementation';Signature:
function mockImplementation(params: MockImplementationParams<T, K, F>): I<v>Parameters:
| Parameter | Type | Description |
|---|---|---|
params |
MockImplementationParams<T, K, F> | The parameters for the spy. |
Returns: I<v> — The spy instance.
Links to this page: