Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function testing.createMockContext
import { testing } from "https://deno.land/x/oak_sessions@v4.1.10/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]