Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/hex/src/lib/stdx/mod.ts>testing.mock.Stub

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
interface testing.mock.Stub
implements Spy<Self, Args, Return>
import { type testing } from "https://deno.land/x/hex@0.6.5/src/lib/stdx/mod.ts";
const { Stub } = testing.mock;

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.