Mocking Express Request and Response

# tests.spec.ts

import { Request, Response } from 'express';

const req = {} as Request;
const res = {} as Response;

describe('' => {});

This is the easiest way I’ve found to mock, type, and test Request/Response in TypeScript.

Written on November 22, 2019