Function
createRequest
(
body: object | string,
headers?: {[key: string]: string},
)
Source from the content-addressed store, hash-verified
| 18 | }; |
| 19 | |
| 20 | const createRequest = ( |
| 21 | body: object | string, |
| 22 | headers?: {[key: string]: string}, |
| 23 | ) => |
| 24 | ({ |
| 25 | body, |
| 26 | // eslint-disable-next-line @typescript-eslint/no-unused-vars |
| 27 | header: (h: string) => { |
| 28 | return headers === undefined ? '' : headers[h]; |
| 29 | }, |
| 30 | }) as Request; |
| 31 | |
| 32 | class ResponseMock extends EventEmitter { |
| 33 | public headers: {[key: string]: string} = {}; |
Tested by
no test coverage detected