Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hex/src/lib/stdx/testing.ts>mock.returnsThis

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
function mock.returnsThis
import { mock } from "https://deno.land/x/hex@0.6.5/src/lib/stdx/testing.ts";
const { returnsThis } = mock;

Creates a function that returns the instance the method was called on.

Type Parameters

optional
Self = any
optional
Args extends unknown[] = any[]

Returns

(this: Self, ...args: Args) => Self