Evolve summarizer into AI service with OCR support
This commit is contained in:
@@ -9,6 +9,11 @@ jest.mock('./api', () => ({
|
||||
delete: jest.fn(() => Promise.resolve({ data: {} })),
|
||||
interceptors: { request: { use: jest.fn() }, response: { use: jest.fn() } },
|
||||
},
|
||||
getApiErrorMessage: jest.fn((error: any, fallback?: string) => {
|
||||
if (typeof error?.response?.data === 'string' && error.response.data.trim()) return error.response.data;
|
||||
if (typeof error?.message === 'string' && error.message.trim()) return error.message;
|
||||
return fallback || 'Request failed.';
|
||||
}),
|
||||
}));
|
||||
|
||||
jest.mock('./components/GoogleAuthCard', () => () => null);
|
||||
|
||||
Reference in New Issue
Block a user