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

x/oak/testing.ts>createMockContext

A middleware framework for handling HTTP with Deno, Node, Bun and Cloudflare Workers 🐿️ 🦕
Very Popular
Latest
function createMockContext
import { createMockContext } from "https://deno.land/x/oak@v17.1.3/testing.ts";

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]