react-native
react-native copied to clipboard
Add missing `remove` method to `addEventListener` Jest mocks
Summary:
While writing some Jest tests, I noticed some instances of the following error:
Cannot read properties of undefined (reading 'remove')
Looks like there were two cases where the {remove: () => {}} return result was missing in the provided Jest mocks:
-
AccessibilityInfo.addEventListener -
Linking.addEventListener
Changelog:
[GENERAL] [FIXED] - Added missing remove methods for Linking.addEventListener and AccessibilityInfo.addEventListener Jest mocks
Test Plan
N/A