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

x/rhum/mod.ts>Interfaces.IMock

A test double library
Latest
interface Interfaces.IMock
import { type Interfaces } from "https://deno.land/x/rhum@v2.2.0/mod.ts";
const { IMock } = Interfaces;

Type Parameters

OriginalObject

Properties

calls: MockMethodCalls<OriginalObject>

Property to track method calls.

is_mock: boolean

Helper property to see that this is a mock object and not the original.

Methods

Access the method expectation creator to create an expectation for the given method.

method<ReturnValue>(method: MethodOf<OriginalObject>): IMethodChanger<ReturnValue>

Access the method pre-programmer to change the behavior of the given method.

verifyExpectations(): void

Verify that all expectations from the .expects() calls.