Commit 10ce003
authored
chore(notification_center)[OASIS-5764]: Add all unit tests for the notification_center module (#392)
Summary:
- The notification_center module did not have a unit test associated with it.
- This PR addresses that to ensure 100% coverage of this module.
Test plan:
addNotificationListener
- only valid listener types should have listeners registered
- the listenerId should be returned upon successful registration
- cannot register the same callback twice
removeNotificationListener
- should return true if the listener is successfully removed
- should only remove the specified listener using the listenerId
clearAllNotificationListeners
- should remove all listeners of all types
clearNotificationListeners
- should remove only the specified notification type when there are no listeners registered
- should remove only the specified notification type and leave all other notification type listeners still registered
sendNotifications
- checks that each notification type listeners executes the callback with the passed in notification data from the user
Issues
- Addresses OASIS-5764 (https://optimizely.atlassian.net/browse/OASIS-5764)1 parent bc84698 commit 10ce003
File tree
1 file changed
+877
-0
lines changed- packages/optimizely-sdk/lib/core/notification_center
1 file changed
+877
-0
lines changed
0 commit comments