Skip to content
Advertisement

Tag: apple-push-notifications

How to mock Push notification native module in React native jest tests?

When using the module react-native-push-notification, I had this error: I tried to mock the module by creating __mocks__/react-native.js and putting this code within it: Now, I have this error: How I could mock fully this module the right way? Answer I mocked the module PushNotificationIOS by creating a setup file jest/setup.js: I’ve configured jest to run this setup file by

Advertisement