Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
class SpyStubBuilder
import { SpyStubBuilder } from "https://deno.land/x/rhum@v2.1.0-rc.1/src/spy/spy_stub_builder.ts";

Builder to help build the following:

  • Spies for object methods (e.g., someObject.someMethod()).
  • Spies for function expressions (e.g., const hello = () => "world").

Constructors

new
SpyStubBuilder(original: OriginalObject)

Type Parameters

OriginalObject
ReturnValue

Methods

Create this spy stub for a function expression.

Create this spy stub for an object's method.

Set the name of the method this spy stub is stubbing.

returnValue(returnValue: ReturnValue): this

Set the return value of this spy stub.