Merge remote-tracking branch 'upstream/main' into fix/363-geocode-proxy

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Niccolò Saggese committed 2026-09-29 19:16:15 +02:00
commit 5083a74413
542 files changed
+96845 -3034

No files matched your search

+9 -8
View File
@@ -227,13 +227,14 @@ test('routing middleware uses configured OSRM servers while retaining request bo
assert.equal(calls, 1);
});
test('regional reverse geocoding uses the configured Nominatim endpoint and projection', async () => {
const lookup = createRegionalPlaceProvider({
endpoint: 'https://places.example/reverse',
requestJson: async (url) => {
assert.equal(new URL(url).origin, 'https://places.example');
return { address: { city: 'Town', country: 'Country' } };
},
test('regional place lookup uses bundled Natural Earth with networking unavailable', async (t) => {
t.mock.method(globalThis, 'fetch', () => {
throw new Error('Network forbidden');
});
assert.equal((await lookup(point)).locality, 'Town');
const lookup = createRegionalPlaceProvider();
assert.equal(
(await lookup({ latitude: 30.2672, longitude: -97.7431 })).region,
'Edwards Plateau',
);
assert.equal((await lookup({ latitude: 26, longitude: -90 })).kind, 'marine');
});