fix: revert experimental ImmichClient refactoring and restore absolute baseline for image loading

This commit is contained in:
ralksta
2026-03-07 09:37:48 +01:00
parent 277aab54e1
commit 68e442fff5
2 changed files with 19 additions and 25 deletions

View File

@@ -39,11 +39,10 @@ describe('ImmichClient', () => {
// Access private method via any casting for testing
const result = await (immich as any).request('/test');
expect(result.data).toEqual({ foo: 'bar' });
expect(result.error).toBeNull();
expect(result).toEqual({ foo: 'bar' });
});
it('returns error on non-ok response', async () => {
it('returns null on non-ok response', async () => {
mockFetch.mockResolvedValueOnce({
ok: false,
status: 404,
@@ -51,8 +50,7 @@ describe('ImmichClient', () => {
});
const result = await (immich as any).request('/test');
expect(result.data).toBeNull();
expect(result.error).toContain('404 Not Found');
expect(result).toBeNull();
});
});