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

x/rimbu/spy/mod.ts

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
import * as rimbu from "https://deno.land/x/rimbu@1.1.0/spy/mod.ts";

Namespaces

Contains functions that can be used to Spy, Stub, and partially Mock functions, objects and classes.

Functions

Returns a tuple containing a spied class and an object containing extra information about the created class instances.

Returns a spied function instance that tracks the function calls and optionally uses some original or stub implementation.

Returns a tuple containing the spied object, and the metadata object giving more information about the stubbed object.

Interfaces

Utility type to use a Func type in an interface.

The metadata object type for a spied class.

The spied function type containing extra information about the function calls.

The extra information added to spied functions.

The additional information available for spied objects.

Type Aliases

Convenience type for any type having a constructor.

Convenience type for a function.

Utility type to return the contained type of a promise.

The resulting tuple type of the Spy.cls function containing the resulting spy class, and the metadata object containing extra information about the created instances.

Spy object type of a spied class, containing extra metadata compared to object spies.

The allowed values to supply to a stub spy function implementation. Either a simple stub item or a sequence of stub items.

A single function stub return item.

A method call tuple containing the called method name first, and then the corresponding parameters used.

The spied object type, where the object methods/functions are augmented with spy information.

A stub implementation type for objects of type T.