Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
function stdx.testing.mock.spy
import { stdx } from "https://deno.land/x/hex@0.6.5/src/lib/mod.ts";
const { spy } = stdx.testing.mock;

Wraps a function or instance method with a Spy.

Type Parameters

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

Type Parameters

Self
Args extends unknown[]
Return

Parameters

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

Type Parameters

Self
Prop extends keyof Self

Parameters

self: Self
property: Prop

Returns

Spy<Self, GetParametersFromProp<Self, Prop>, GetReturnFromProp<Self, Prop>>