TypeError: _reactNativePushNotification.default.localNotificationSchedule is not a function while writing unit test

TypeError: _reactNativePushNotification.default.localNotificationSchedule is not a function while writing unit test

我无法为以下代码编写单元测试

import PushNotification from 'react-native-push-notification'
import { timeZoneForNotification } from '../Assets/Constants/constants'
import firebase from 'react-native-firebase'
export const scheduleNotification = ({ 
    title = timeZoneForNotification.title, 
    message 
 },
  date
) => {
  PushNotification.localNotificationSchedule({ title, message, date })
}

请为通知模块添加本机代码。

供参考:

https://github.com/react-native-community/react-native-push-notification-ios#appdelegatem

这里是mock的方法

jest.mock('react-native-push-notification', () => ({
  configure: jest.fn(),
  onRegister: jest.fn(),
  onNotification: jest.fn(),
  addEventListener: jest.fn(),
  requestPermissions: jest.fn()
}))