Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_slack_sdk/dev_deps.ts>mock.Spy

SDK for building Run on Slack apps using Deno
Extremely Popular
Go to Latest
interface mock.Spy
import { type mock } from "https://deno.land/x/deno_slack_sdk@1.6.1/dev_deps.ts";
const { Spy } = mock;

A function or instance method wrapper that records all calls made to it.

Type Parameters

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

Call Signatures

(this: Self, ...args: Args): Return

Properties

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

The function that is being spied on.

calls: SpyCall<Self, Args, Return>[]

Information about calls made to the function or instance method.

restored: boolean

Whether or not the original instance method has been restored.

Methods

restore(): void

If spying on an instance method, this restores the original instance method.