Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
class SpyBuilder
import { SpyBuilder } from "https://deno.land/x/rhum@v2.1.0/src/spy/spy_builder.ts";

Builder to help build a spy object. This does all of the heavy-lifting to create a spy object. Its create() method returns an instance of Spy, which is basically an original object with stubbed data members.

This builder differs from the SpyStub because it stubs out the entire class, whereas the SpyStub stubs specific data members.

Under the hood, this builder uses SpyStub to stub the data members in the class.

Type Parameters

ClassToSpy

Methods

Create the spy object.