fix: Return proper error objects for HTTP errors
This commit is contained in:
@ -74,6 +74,9 @@ const mock: JestMockFn<any, any> = jest.fn((fetchUrl, fetchOptions) => {
|
||||
mockResponse,
|
||||
);
|
||||
return {
|
||||
ok: true,
|
||||
status: 200,
|
||||
statusText: 'OK',
|
||||
text: () => {
|
||||
return Promise.resolve(JSON.stringify(response));
|
||||
},
|
||||
|
Reference in New Issue
Block a user