Trying to mock AdvancedMarkerElement from google.maps.MarkerLibrary
We have been banging our heads against the wall trying to test the AdvancedMarkerElement from the google maps api. We replaced google.maps.Markers with AdvancedMarkerElement. The tests we had originally were using @googlemaps/jest-mocks'
and we mocked the listener and then called it directly using addListenerSpy.mock.calls[0][1]()
and then assert that the proper calls were made. Below is the test which was working with Markers