import { SpyStubBuilder } from "https://deno.land/x/rhum@v2.2.0/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)Methods
Create this spy stub for a function expression.
Create this spy stub for an object's method.
method(method: MethodOf<OriginalObject>): this
Set the name of the method this spy stub is stubbing.
returnValue(returnValue: ReturnValue): this
Set the return value of this spy stub.