Merge branch 'main' into pr/panoramax

This commit is contained in:
Said Turksever authored and GitHub committed 2026-10-15 20:17:28 +01:00
commit ab14f48360
10 files changed
+385 -9

No files matched your search

+45
View File
@@ -457,6 +457,51 @@ test('bike share names the systems it did not search', async () => {
);
});
test('bike share over Oslo searches only the nearby Norwegian systems', async () => {
const requested = [];
const result = await composeCatalog({
tools: coreTools,
services: {
bikeshare: {
systems: GBFS_CITY_REGISTRY,
getStations: async (url) => {
requested.push(url);
return { data: { stations: [] } };
},
},
},
}).call('get_bike_share', {
area: { lat: 59.9139, lon: 10.7522, radius_km: 5 },
});
assert.deepEqual(result.data.systems.sort(), [
'Lillestrøm, Norway',
'Oslo, Norway',
]);
assert.deepEqual(result.data.systems_not_searched, []);
assert.ok(
requested.every(
(url) =>
url.startsWith('https://gbfs.urbansharing.com/oslobysykkel.no/') ||
url.startsWith('https://api.cyclocity.fr/contracts/lillestrom/'),
),
);
});
test('bike share over Stavanger searches Kolumbus Bysykkel', async () => {
const result = await composeCatalog({
tools: coreTools,
services: {
bikeshare: {
systems: GBFS_CITY_REGISTRY,
getStations: async () => ({ data: { stations: [] } }),
},
},
}).call('get_bike_share', {
area: { lat: 58.97, lon: 5.7331, radius_km: 5 },
});
assert.deepEqual(result.data.systems, ['Stavanger, Norway']);
});
test('traffic counts only roads inside a radius area and reports missing tiles', async () => {
const flow = (segments, partial = false) => ({
getStatus: async () => ({ hasKey: true }),