@@ -25,18 +25,18 @@ describe('EventsRegistry', () => {
2525 it ( 'delegates to nativeEventsReceiver' , ( ) => {
2626 const cb = jest . fn ( ) ;
2727
28- uut . registerRemoteNotificationReceivedForeground ( cb ) ;
28+ uut . registerNotificationReceivedForeground ( cb ) ;
2929
30- expect ( mockNativeEventsReceiver . registerRemoteNotificationReceived ) . toHaveBeenCalledTimes ( 1 ) ;
31- expect ( mockNativeEventsReceiver . registerRemoteNotificationReceived ) . toHaveBeenCalledWith ( expect . any ( Function ) ) ;
30+ expect ( mockNativeEventsReceiver . registerNotificationReceived ) . toHaveBeenCalledTimes ( 1 ) ;
31+ expect ( mockNativeEventsReceiver . registerNotificationReceived ) . toHaveBeenCalledWith ( expect . any ( Function ) ) ;
3232 } ) ;
3333
3434 it ( 'should wrap callback with completion block' , ( ) => {
3535 const wrappedCallback = jest . fn ( ) ;
3636 const notification : Notification = new Notification ( { identifier : 'identifier' } ) ;
3737
38- uut . registerRemoteNotificationReceivedForeground ( wrappedCallback ) ;
39- const call = mockNativeEventsReceiver . registerRemoteNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
38+ uut . registerNotificationReceivedForeground ( wrappedCallback ) ;
39+ const call = mockNativeEventsReceiver . registerNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
4040 call ( notification ) ;
4141
4242 expect ( wrappedCallback ) . toBeCalledWith ( notification , expect . any ( Function ) ) ;
@@ -46,23 +46,23 @@ describe('EventsRegistry', () => {
4646 it ( 'should wrap callback with completion block' , ( ) => {
4747 const expectedNotification : Notification = new Notification ( { identifier : 'identifier' } ) ;
4848
49- uut . registerRemoteNotificationReceivedForeground ( ( notification ) => {
49+ uut . registerNotificationReceivedForeground ( ( notification ) => {
5050 expect ( notification ) . toEqual ( expectedNotification ) ;
5151 } ) ;
52- const call = mockNativeEventsReceiver . registerRemoteNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
52+ const call = mockNativeEventsReceiver . registerNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
5353 call ( expectedNotification ) ;
5454 } ) ;
5555
5656 it ( 'should invoke finishPresentingNotification' , ( ) => {
5757 const notification : Notification = new Notification ( { identifier : 'notificationId' } ) ;
5858 const response : NotificationCompletion = { alert : true }
5959
60- uut . registerRemoteNotificationReceivedForeground ( ( notification , completion ) => {
60+ uut . registerNotificationReceivedForeground ( ( notification , completion ) => {
6161 completion ( response ) ;
6262
6363 expect ( mockNativeCommandsSender . finishPresentingNotification ) . toBeCalledWith ( notification . identifier , response ) ;
6464 } ) ;
65- const call = mockNativeEventsReceiver . registerRemoteNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
65+ const call = mockNativeEventsReceiver . registerNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
6666 call ( notification ) ;
6767 } ) ;
6868
@@ -71,12 +71,12 @@ describe('EventsRegistry', () => {
7171 const expectedNotification : Notification = new Notification ( { identifier : 'notificationId' } ) ;
7272 const response : NotificationCompletion = { alert : true }
7373
74- uut . registerRemoteNotificationReceivedForeground ( ( notification , completion ) => {
74+ uut . registerNotificationReceivedForeground ( ( notification , completion ) => {
7575 completion ( response ) ;
7676 expect ( expectedNotification ) . toEqual ( notification ) ;
7777 expect ( mockNativeCommandsSender . finishPresentingNotification ) . toBeCalledTimes ( 0 ) ;
7878 } ) ;
79- const call = mockNativeEventsReceiver . registerRemoteNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
79+ const call = mockNativeEventsReceiver . registerNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
8080 call ( expectedNotification ) ;
8181 } ) ;
8282 } ) ;
@@ -89,18 +89,18 @@ describe('EventsRegistry', () => {
8989 it ( 'delegates to nativeEventsReceiver' , ( ) => {
9090 const cb = jest . fn ( ) ;
9191
92- uut . registerRemoteNotificationReceivedBackground ( cb ) ;
92+ uut . registerNotificationReceivedBackground ( cb ) ;
9393
94- expect ( mockNativeEventsReceiver . registerRemoteNotificationReceived ) . toHaveBeenCalledTimes ( 1 ) ;
95- expect ( mockNativeEventsReceiver . registerRemoteNotificationReceived ) . toHaveBeenCalledWith ( expect . any ( Function ) ) ;
94+ expect ( mockNativeEventsReceiver . registerNotificationReceived ) . toHaveBeenCalledTimes ( 1 ) ;
95+ expect ( mockNativeEventsReceiver . registerNotificationReceived ) . toHaveBeenCalledWith ( expect . any ( Function ) ) ;
9696 } ) ;
9797
9898 it ( 'should wrap callback with completion block' , ( ) => {
9999 const wrappedCallback = jest . fn ( ) ;
100100 const notification : Notification = new Notification ( { identifier : 'identifier' } ) ;
101101
102- uut . registerRemoteNotificationReceivedBackground ( wrappedCallback ) ;
103- const call = mockNativeEventsReceiver . registerRemoteNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
102+ uut . registerNotificationReceivedBackground ( wrappedCallback ) ;
103+ const call = mockNativeEventsReceiver . registerNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
104104 call ( notification ) ;
105105
106106 expect ( wrappedCallback ) . toBeCalledWith ( notification , expect . any ( Function ) ) ;
@@ -110,23 +110,23 @@ describe('EventsRegistry', () => {
110110 it ( 'should wrap callback with completion block' , ( ) => {
111111 const expectedNotification : Notification = new Notification ( { identifier : 'identifier' } ) ;
112112
113- uut . registerRemoteNotificationReceivedBackground ( ( notification ) => {
113+ uut . registerNotificationReceivedBackground ( ( notification ) => {
114114 expect ( notification ) . toEqual ( expectedNotification ) ;
115115 } ) ;
116- const call = mockNativeEventsReceiver . registerRemoteNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
116+ const call = mockNativeEventsReceiver . registerNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
117117 call ( expectedNotification ) ;
118118 } ) ;
119119
120120 it ( 'should invoke finishPresentingNotification' , ( ) => {
121121 const notification : Notification = new Notification ( { identifier : 'notificationId' } ) ;
122122 const response : NotificationCompletion = { alert : true }
123123
124- uut . registerRemoteNotificationReceivedBackground ( ( notification , completion ) => {
124+ uut . registerNotificationReceivedBackground ( ( notification , completion ) => {
125125 completion ( response ) ;
126126
127127 expect ( mockNativeCommandsSender . finishPresentingNotification ) . toBeCalledWith ( notification . identifier , response ) ;
128128 } ) ;
129- const call = mockNativeEventsReceiver . registerRemoteNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
129+ const call = mockNativeEventsReceiver . registerNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
130130 call ( notification ) ;
131131 } ) ;
132132
@@ -135,12 +135,12 @@ describe('EventsRegistry', () => {
135135 const expectedNotification : Notification = new Notification ( { identifier : 'notificationId' } ) ;
136136 const response : NotificationCompletion = { alert : true }
137137
138- uut . registerRemoteNotificationReceivedBackground ( ( notification , completion ) => {
138+ uut . registerNotificationReceivedBackground ( ( notification , completion ) => {
139139 completion ( response ) ;
140140 expect ( expectedNotification ) . toEqual ( notification ) ;
141141 expect ( mockNativeCommandsSender . finishPresentingNotification ) . toBeCalledTimes ( 0 ) ;
142142 } ) ;
143- const call = mockNativeEventsReceiver . registerRemoteNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
143+ const call = mockNativeEventsReceiver . registerNotificationReceived . mock . calls [ 0 ] [ 0 ] ;
144144 call ( expectedNotification ) ;
145145 } ) ;
146146 } ) ;
0 commit comments