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

x/denomongo_unittest_utils/examples/example_deps.ts>Spy

Unittest utilities for deno_mongo
Latest
interface Spy
import { type Spy } from "https://deno.land/x/denomongo_unittest_utils@v0.5.3/examples/example_deps.ts";

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

Type Parameters

T
optional
TArgs extends any[] = any[]
optional
TReturn extends any = any

Call Signatures

(this: T | void, ...args: TArgs): TReturn

Properties

calls: SpyCall[]

Information about calls made to the function or instance method or getter/setter being spied on.

optional
get: Spy<T>

A spy on the getter for an instance attribute.

optional
set: Spy<T>

A spy on the setter for an instance attribute.

Methods

restore(): void

Removes spy wrapper from instance property.