import supertest from 'supertest' ; import type { Application } from 'express' ; export const requestFactory = ( appOrUrl ) => { const request = supertest ( appOrUrl ) ; return ( path , { method = 'get' } = { } ) => { return request [ method ] ( path ) ; } ; } ;