Skip to main content
Module

std/testing/mock.ts>Stub

The Deno Standard Library
Latest
The Standard Library has been moved to JSR. See the blog post for details.
interface Stub
implements MethodSpy<Self, Args, Return>
import { type Stub } from "https://deno.land/std@0.224.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.