UNPKG

@revoloo/cypress6

Version:

Cypress.io end to end testing tool

19 lines (14 loc) 332 B
import { HttpMiddleware, _runStage } from '../../../lib/http' export function testMiddleware (middleware: HttpMiddleware<any>[], ctx = {}) { const fullCtx = { req: {}, res: {}, config: {}, getRemoteState: () => {}, middleware: { 0: middleware, }, ...ctx, } return _runStage(0, fullCtx) }