| 57 | |
| 58 | /** Options that can be set in a mock context. */ |
| 59 | export interface MockContextOptions< |
| 60 | R extends string, |
| 61 | P extends RouteParams<R> = RouteParams<R>, |
| 62 | S extends State = Record<string, any>, |
| 63 | > { |
| 64 | app?: Application<S>; |
| 65 | ip?: string; |
| 66 | method?: string; |
| 67 | params?: P; |
| 68 | path?: string; |
| 69 | state?: S; |
| 70 | headers?: [string, string][]; |
| 71 | body?: ReadableStream; |
| 72 | } |
| 73 | |
| 74 | /** Allows external parties to modify the context state. */ |
| 75 | export const mockContextState = { |
nothing calls this directly
no outgoing calls
no test coverage detected