Skip to main content
Module

x/rhum/mod.ts>Fake

A test double library
Latest
function Fake
import { Fake } from "https://deno.land/x/rhum@v2.2.0/mod.ts";

Get the builder to create fake objects.

Per Martin Fowler (based on Gerard Meszaros), "Fake objects actually have working implementations, but usually take some shortcut which makes them not suitable for production (an InMemoryTestDatabase is a good example)."

Parameters

constructorFn: Constructor<T>
  • The constructor function of the object to fake.

Returns

Instance of FakeBuilder.