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

Create a mock object as an extension of an original object.

Type Parameters

OriginalConstructor
OriginalObject

Parameters

OriginalClass: OriginalConstructor
  • The class the mock should extend.
...originalConstructorArgs: unknown[]

Returns

A mock object of the OriginalClass.