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

x/deno_nest/tests/common_helper.ts>MockRouter

Refer to nestjs to realize some common functions for Deno, support hono and oak
Latest
class MockRouter
implements IRouter
import { MockRouter } from "https://deno.land/x/deno_nest@v3.15.1/tests/common_helper.ts";

Properties

map: Map<Uppercase<MethodType>, Map<string, MethodHandler>>

Methods

private
handle(
path: string,
method: Uppercase<MethodType>,
)
delete(path: string, fn: MiddlewareHandler)
get(path: string, fn: MiddlewareHandler)
patch(path: string, fn: MiddlewareHandler)
post(path: string, fn: MiddlewareHandler)
put(path: string, fn: MiddlewareHandler)
routes(): void
useOriginMiddleware(_fn: Function, _path?: string): void