react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

How to mock messaging with jest

Open hamidre13 opened this issue 7 years ago • 3 comments

Hi I looked at your docs and also api , but I still could not find any documentation about proper mocking with jest. I also asked my question in stack overflow in case anyone else needs the answer as well:https://stackoverflow.com/questions/59144903/react-native-firebase-messaging-mocking-with-jest

I was wondering if you can write some documentation for proper mocking of v6 of messaging with jest.

Thanks

hamidre13 avatar Dec 02 '19 19:12 hamidre13

@hamidre13 have you solved this issue? Also, there is a comment in your reply. Would be nice if you can reply to it, so people can help and be helped :)

rafaelcavalcante avatar Apr 29 '20 20:04 rafaelcavalcante

Hi Yes,

I was able to fix it, but then I cannot provide the whole code as it is a private repo. I did not test the actual firebase though, I was only able to mock and run jest for my other test cases.

hamidre13 avatar Apr 29 '20 20:04 hamidre13

No problem, i understand. Just asking because i couldn't solve my issue using the SO thread

rafaelcavalcante avatar Apr 29 '20 20:04 rafaelcavalcante