thebergamo / react-native-fbsdk-next

MIT License
633 stars 165 forks source link

Mock all functions of the `AppEventsLogger` #494

Closed mikestone14 closed 2 months ago

mikestone14 commented 2 months ago

🐛 Bug Report

As a developer When I test my implementation of React Native FBSDK Next And I configure the jest mock in the package Then I expect all the AppEventsLogger functions to be mocked

To Reproduce

Write a jest test mocking the getAnonymousID function on AppEventsLogger See an error that getAnonymousID is not a defined function

Expected Behavior

You can successfully mock the function

Code Example

jest.spyOn(AppEventsLogger, 'getAnonymousID').mockResolvedValueOnce('mockFbAnonID')
github-actions[bot] commented 2 months ago

:tada: This issue has been resolved in version 12.1.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: