import * as querystring from 'qs' ; import { ExpressConnection } from '../src/express' ; export class MockRequest { query : querystring . ParsedQs ; constructor ( readonly params ? , readonly rawQuery = '' , readonly body ? , readonly headers = { } , readonly originalUrl = '' , readonly method = 'GET' ) { this . query = querystring . parse ( rawQuery ) ; } header ( name ) { return this . headers [ name ] ; } } export class MockConnection < S > extends ExpressConnection < S > { constructor ( req ) { super ( req as any , null as any ) ; } }