( url: string, body: string, contentType = 'text/plain', )
| 25 | } |
| 26 | |
| 27 | function makeAxiosResponse( |
| 28 | url: string, |
| 29 | body: string, |
| 30 | contentType = 'text/plain', |
| 31 | ): AxiosResponse<ArrayBuffer> { |
| 32 | return { |
| 33 | config: {}, |
| 34 | data: arrayBufferFromText(body), |
| 35 | headers: { 'content-type': contentType }, |
| 36 | status: 200, |
| 37 | statusText: 'OK', |
| 38 | request: { url }, |
| 39 | } as AxiosResponse<ArrayBuffer> |
| 40 | } |
| 41 | |
| 42 | function makeRedirectError(status: number, location: string): Error { |
| 43 | return { |
no test coverage detected