mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-19 13:21:46 +00:00
fix(tests): align tests to actual working code
This commit is contained in:
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user