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.mockSession

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

Creates a session that tracks all mocks created before it's restored. If a callback is provided, it restores all mocks created within it.

Returns

number

Type Parameters

Self
Args extends unknown[]
Return

Parameters

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

Returns

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