Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
class SpyBuilder
import { SpyBuilder } from "https://deno.land/x/rhum@v2.2.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.