Skip to content

Commit

Permalink
test: PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Aug 26, 2022
1 parent 5ea478c commit a9bf8f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/my-map/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const setupMap = async (mapElement: any) => {

test("olMap is added to the global window for tests", async () => {
await setupMap(`<my-map id="map-vitest" disableVectorTiles />`);
expect(window.olMap).not.toBeUndefined();
expect(window.olMap).toBeTruthy();
expect(window.olMap).toBeInstanceOf(Map);
});

Expand Down Expand Up @@ -82,7 +82,7 @@ describe("Snap points loading behaviour", () => {
drawMode
osVectorTileApiKey=${process.env.VITE_APP_OS_VECTOR_TILES_API_KEY}
/>`);
expect(getSnapSpy).toHaveBeenCalled();
expect(getSnapSpy).toHaveBeenCalledOnce();
});

it("should load snap points on zoom into correct range", async () => {
Expand All @@ -94,7 +94,7 @@ describe("Snap points loading behaviour", () => {
/>`);
window.olMap?.getView().setZoom(ZOOM_WITHIN_RANGE);
window.olMap?.dispatchEvent("loadend");
expect(getSnapSpy).toHaveBeenCalled();
expect(getSnapSpy).toHaveBeenCalledOnce();
});

it("should clear snap points on zoom out of range", async () => {
Expand Down

0 comments on commit a9bf8f0

Please sign in to comment.