Skip to main content
Module

std/testing/mock.ts>Stub

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

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

Type Parameters

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

Properties

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

The function that is used instead of the original.