invertase / react-native-notifee

Moved to https://github.com/invertase/notifee
https://invertase.io/blog/open-sourcing-notifee
Other
465 stars 31 forks source link

"TypeError: this.native.cancelDisplayedNotifications is not a function" when using jest mock #310

Closed mars-lan closed 3 years ago

mars-lan commented 3 years ago

When using the jest mock suggestion in https://github.com/notifee/react-native-notifee#jest-testing, I still ended up getting this error.

mikehardy commented 3 years ago

The mock itself is likely out of date and does not define it - indeed I just looked - you are at this moment in there with #309 probably easiest thing - specifically because you'll be testing it right now and will know it works for you is to post a quick PR that stubs that function as well

helenaford commented 3 years ago

Fixed merged into master in #318, will be out in the next release.

helenaford commented 3 years ago

thanks for your help @mars-lan with this, the jest-mock.js has been updated and included in the latest release 1.8.1.