Is there an example project somewhere showing how to test a component using a google-map component ? I've tried a lot of things, but I had to give up.
For example I tried using the following code in my beforeEach :
mapSpy = createMapSpy(DEFAULT_OPTIONS);
mapConstructorSpy = createMapConstructorSpy(mapSpy);
But I still get an error such as "Uncaught TypeError: googleMap.setOptions is not a function "
Am having the same problem with Angular 9.1 where I'm getting ReferenceError: google is not defined in my unit tests, so I'd love to see a working example too..
âž•
We've got tests for the Google Map and related components that can be used as a reference: https://github.com/angular/components/blob/master/src/google-maps/google-map/google-map.spec.ts#L56
@vbourdeix your test seems to be failing because your mock is incomplete.
Closing because this issue has been inactive for 2 weeks or more after follow up was requested.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Am having the same problem with Angular 9.1 where I'm getting ReferenceError: google is not defined in my unit tests, so I'd love to see a working example too..