Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/oak_nest/test_deps.ts>testing.createMockContext

Refer to nestjs to realize some common functions for Deno
Go to Latest
function testing.createMockContext
import { testing } from "https://deno.land/x/oak_nest@v1.13.15/test_deps.ts";
const { createMockContext } = testing;

Create a mock of Context or RouterContext.

Type Parameters

R extends string
optional
P extends RouteParams<R> = RouteParams<R>
optional
S extends State = Record<string, any>

Parameters

optional
unnamed 0: MockContextOptions<R> = [UNSUPPORTED]