fix(tests): align tests to actual working code

This commit is contained in:
jubnl
2026-04-13 14:48:25 +02:00
parent c39182616b
commit e629548a42
3 changed files with 33 additions and 12 deletions
@@ -384,7 +384,12 @@ describe('searchNominatim (fetch stubbed)', () => {
});
it('MAPS-030b: throws when nominatim response is not ok', async () => {
vi.stubGlobal('fetch', vi.fn().mockResolvedValue({ ok: false }));
vi.stubGlobal('fetch', vi.fn().mockResolvedValue({
ok: false,
status: 500,
statusText: 'Internal Server Error',
text: async () => '',
}));
const { searchNominatim } = await import('../../../src/services/mapsService');
await expect(searchNominatim('fail')).rejects.toThrow('Nominatim API error');
});