feat(staples): A3/D3 — Pantry staples toggle UI #35
@@ -84,4 +84,10 @@ describe('household staples page — load', () => {
|
||||
expect(leer).toBeDefined();
|
||||
expect(leer.ingredients).toHaveLength(0);
|
||||
});
|
||||
|
||||
it('returns empty categories when API fails', async () => {
|
||||
mockGet.mockResolvedValue({ data: undefined, error: { status: 500 } });
|
||||
const result = await load({ fetch: vi.fn() } as any);
|
||||
expect(result.categories).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user