mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 17:52:21 +00:00
test(places): pin the pack build-date rule and a nearer village beating a namesake inside a wide search
Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
75e345aa07
commit
50824c9a65
4 files changed
+66
-19
No files matched your search
@@ -115,6 +115,17 @@ test('a small place in view comes before a far bigger city of its name', async (
|
||||
const austin = { latitude: 30.27, longitude: -97.74 };
|
||||
assert.equal((await find('Paris', austin)).wikidata, 'Q-village');
|
||||
assert.ok((await find('Paris', austin)).distanceKm < 20);
|
||||
// A bigger namesake inside a wider search: the nearer village still wins.
|
||||
assert.equal(
|
||||
(
|
||||
await module.findPlace(
|
||||
'Paris',
|
||||
{ near: austin, radiusKm: 600, includeSmallPlaces: true },
|
||||
fetchImpl,
|
||||
)
|
||||
).wikidata,
|
||||
'Q-village',
|
||||
);
|
||||
// Only when small places are asked for.
|
||||
assert.equal(
|
||||
(await module.findPlace('Paris', { near: austin }, fetchImpl)).wikidata,
|
||||
|
||||
Reference in new issue
Block a user