google-signin icon indicating copy to clipboard operation
google-signin copied to clipboard

[wip] add jest mock

Open vonovak opened this issue 7 years ago • 6 comments

vonovak avatar Aug 22 '18 22:08 vonovak

Is there something missing which prevents merge to master?

jozan avatar Sep 09 '18 18:09 jozan

yeah, I wanna make this a little more flexible by allowing to choose mocking success / cancel / other cases. Just need to find some extra time for this.

vonovak avatar Sep 09 '18 19:09 vonovak

For future readers, isSignedIn is missing:

isSignedIn: jest.fn(() => Promise.resolve(true)),

neiker avatar Oct 16 '19 14:10 neiker

Hey guys ! Just wondering if there is any plan to continue this PR ?

pawndev avatar Aug 16 '20 17:08 pawndev

https://github.com/react-native-community/google-signin/issues/164#issuecomment-557914018 appears to be another attempt at a mock for this package. I'd say merging a default mock would be helpful. Consumers can use the Jest API to make it return other values. Not really sure how else you'd make a customizable mock and haven't seen it done in other packages but I'd be curious about how to make one.

OzzieOrca avatar Sep 16 '20 21:09 OzzieOrca

May I know why is it still open?

hungvu193 avatar Jun 22 '22 16:06 hungvu193

Hey @vonovak 👋, would be nice to see this PR get over the line, what do you have left to do. I wouldn't mind getting involved and help contribute.

jnawaz avatar Oct 24 '22 20:10 jnawaz

hmm, yeah, after 4 years I might finally push it over the line.. 😆 give me a week or so pls

vonovak avatar Oct 25 '22 12:10 vonovak

:tada: This PR is included in version 8.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Oct 30 '22 13:10 github-actions[bot]

@vonovak Legend!! I suspect this will be huge for folks wanting to test Google Sign In 🚀

jnawaz avatar Nov 03 '22 22:11 jnawaz