std/testing/mock.ts

Deno standard library
Go to Latest
interface Stub
implements Spy<Self, Args, Return>
import { type Stub } from "https://deno.land/std@0.146.0/testing/mock.ts?s=Stub";

An instance method replacement that records all calls made to it.

Type Parameters

optional
Self = any
[src]
optional
Args extends unknown[] = any[]
[src]
optional
Return = any
[src]

Properties

fake: (this: Self, ...args: Args) => Return[src]

The function that is used instead of the original.