Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM committed Jun 8, 2024
1 parent 965e40e commit ea6d37b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions IsraelHiking.Web/src/application/services/poi.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe("Poi Service", () => {
coordinates: [0, 0]
},
properties: {
sub_class: "spring",
subclass: "spring",
"name:he": "name",
"name:en": "name"
}
Expand All @@ -149,7 +149,7 @@ describe("Poi Service", () => {
coordinates: [0, 0]
},
properties: {
sub_class: "spring",
subclass: "spring",
"name:en": "name"
}
}
Expand All @@ -159,8 +159,7 @@ describe("Poi Service", () => {
mockBackend.match(r => r.url.startsWith(Urls.poiCategories)).forEach(t => t.flush([{ icon: "icon", name: "Water" }]));
await new Promise((resolve) => setTimeout(resolve, 100)); // this is in order to let the code continue to run to the next await

await new Promise((resolve) => setTimeout(resolve, 100)); // this is in order to let the code continue to run to the next await
expect(poiService.poiGeojsonFiltered.features.length).toBe(1);
expect(poiService.poiGeojsonFiltered.features.length).toBe(2);

mapServiceMock.map.querySourceFeatures = () => [
{
Expand All @@ -170,7 +169,7 @@ describe("Poi Service", () => {
coordinates: [0, 0]
},
properties: {
sub_class: "spring",
subclass: "spring",
"name:he": "name",
"name:en": "name"
}
Expand All @@ -182,7 +181,7 @@ describe("Poi Service", () => {
coordinates: [0, 0]
},
properties: {
sub_class: "spring",
subclass: "spring",
"name:he": "name"
}
}
Expand All @@ -192,7 +191,7 @@ describe("Poi Service", () => {

await new Promise((resolve) => setTimeout(resolve, 100)); // this is in order to let the code continue to run to the next await

expect(poiService.poiGeojsonFiltered.features.length).toBe(2);
expect(poiService.poiGeojsonFiltered.features.length).toBe(4);

return promise;
}
Expand Down

0 comments on commit ea6d37b

Please sign in to comment.