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

x/oak/mod.ts>testing.createMockContext

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Very Popular
Go to Latest
function testing.createMockContext
import { testing } from "https://deno.land/x/oak@13.2.4/mod.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]