(status: number, body?: unknown, message = '')
| 10 | // as success while still surfacing real failures. |
| 11 | describe('isDirAlreadyExistsError', () => { |
| 12 | const apiError = (status: number, body?: unknown, message = '') => |
| 13 | new APIError(new Response(null, { status }), { |
| 14 | message, |
| 15 | json: body, |
| 16 | }) |
| 17 | |
| 18 | it('matches a 400 with an EEXIST-style message in the json body', () => { |
| 19 | const err = apiError(400, { |