-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Looking for a mock for google.maps.places.AutocompleteSessionToken #495
Labels
released
triage me
I really want to be triaged.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Comments
boroth
added
triage me
I really want to be triaged.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
labels
Aug 3, 2023
If you would like to upvote the priority of this issue, please comment below or react on the original post above with 👍 so we can see what is popular when we triage.@boroth Thank you for opening this issue. 🙏
This is an automated message, feel free to ignore. |
3 tasks
usefulthink
pushed a commit
that referenced
this issue
Sep 13, 2023
Previously the `google.maps.places.AutocompleteSessionToken` class was not mocked by this library. Developers implementing custom autocomplete operations would likely encounter the following error message in their tests: ``` TypeError: google.maps.places.AutocompleteSessionToken is not a constructor ``` This commit adds a mock and exports it for the `AutocompleteSessionToken` class. The constructor accepts no parameters, and the class does not expose any public functions/methods. resolves: #495
github-actions bot
pushed a commit
that referenced
this issue
Sep 13, 2023
Previously the `google.maps.places.AutocompleteSessionToken` class was not mocked by this library. Developers implementing custom autocomplete operations would likely encounter the following error message in their tests: ``` TypeError: google.maps.places.AutocompleteSessionToken is not a constructor ``` This commit adds a mock and exports it for the `AutocompleteSessionToken` class. The constructor accepts no parameters, and the class does not expose any public functions/methods. resolves: #495 a59d1d8
🎉 This issue has been resolved in version 2.20.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
released
triage me
I really want to be triaged.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
I just updated this library to use the mocks for the AutocompleteService. However, it doesn't look like there's a mock for
google.maps.places.AutocompleteSessionToken
. When trying to use the react-google-places-autocomplete library with the mocks, it throws the following error:Also seeing a similar issue with Geocoder when this line tries to run (https://github.com/Tintef/react-google-places-autocomplete/blob/88c8ec8893394c234899831e0b9da00f8aeb4f54/src/utils/geocode-by-address.ts#L3C1-L3C52), it gives the following error:
Describe the solution you'd like
Would like for the AutocompleteSessionToken to be mocked.
Describe alternatives you've considered
I've considered mocking on my own, I'm just not familiar enough with what needs to be mocked within the constructor. Willing to put in a PR if I can be pointed in the right direction of documentation.
Additional context
n/a
The text was updated successfully, but these errors were encountered: