From 2b3848d6d7307702b86b43cf208150c8846cd22c Mon Sep 17 00:00:00 2001 From: Akash Mohan Chaudhary <30294175+hadt0786@users.noreply.github.com> Date: Fri, 28 Aug 2026 21:57:52 +0530 Subject: [PATCH] test: cover zero coordinates for advanced markers --- src/marker-utils.test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/marker-utils.test.ts b/src/marker-utils.test.ts index 6d014496..1548e2b5 100644 --- a/src/marker-utils.test.ts +++ b/src/marker-utils.test.ts @@ -80,3 +80,18 @@ describe.each(testMarkerTypes)( }); } ); + +test.each([ + { lat: 0, lng: 1 }, + { lat: 1, lng: 0 }, + { lat: 0, lng: 0 }, +])("gets an AdvancedMarker position containing zero: %p", (position) => { + const marker = new google.maps.marker.AdvancedMarkerElement(); + marker.position = position; + + const result = MarkerUtils.getPosition(marker); + + expect(result).toBeInstanceOf(google.maps.LatLng); + expect(result.lat()).toBe(position.lat); + expect(result.lng()).toBe(position.lng); +});