jest-mock-req-res
Version:
Jest mocks for Express Request and Response objects. Inspired by mock-req-res.
16 lines (15 loc) • 473 B
TypeScript
/// <reference types="jest" />
import { Request } from 'express';
import { Dictionary } from 'express-serve-static-core';
interface MockRequest extends Request {
accepts: jest.Mock;
acceptsCharsets: jest.Mock;
acceptsEncodings: jest.Mock;
acceptsLanguages: jest.Mock;
get: jest.Mock;
header: jest.Mock;
is: jest.Mock;
range: jest.Mock;
}
export declare function mockRequest(options?: Dictionary<any>): MockRequest;
export {};