DEV Community

Discussion on: ✨ Introducing use-places-autocomplete: React hook for Google Maps Places Autocomplete

Collapse
 
wellyshen profile image
Welly

You can mock the Google Map API like this: github.com/wellyshen/use-places-au...

Collapse
 
prissvi profile image
PrissVI • Edited

These are test for the package that I am using ('use-places-autocomplete'), but I want to test my own implementation (which I used this package for)

Thread Thread
 
wellyshen profile image
Welly • Edited

You can use jest mock functions to mock this library and let it responses the status and data that you want.

Thread Thread
 
wellyshen profile image
Welly

If you still don't know how to do it, feel free to leave an issue on the repo.