|
@@ -19,8 +19,8 @@ describe('PrivateEventsListener', () => {
|
19
|
19
|
};
|
20
|
20
|
store.setRefForComponentId('myComponentId', mockRef);
|
21
|
21
|
uut.listenAndHandlePrivateEvents();
|
22
|
|
- expect(nativeEventsReceiver.componentDidAppear).toHaveBeenCalledTimes(1);
|
23
|
|
- const callbackFunction = nativeEventsReceiver.componentDidAppear.mock.calls[0][0];
|
|
22
|
+ expect(nativeEventsReceiver.registerComponentDidAppear).toHaveBeenCalledTimes(1);
|
|
23
|
+ const callbackFunction = nativeEventsReceiver.registerComponentDidAppear.mock.calls[0][0];
|
24
|
24
|
expect(callbackFunction).toBeInstanceOf(Function);
|
25
|
25
|
|
26
|
26
|
expect(mockRef.didAppear).not.toHaveBeenCalled();
|
|
@@ -31,7 +31,7 @@ describe('PrivateEventsListener', () => {
|
31
|
31
|
|
32
|
32
|
it('register and listen componentDidDisappear', () => {
|
33
|
33
|
uut.listenAndHandlePrivateEvents();
|
34
|
|
- expect(nativeEventsReceiver.componentDidDisappear).toHaveBeenCalledTimes(1);
|
|
34
|
+ expect(nativeEventsReceiver.registerComponentDidDisappear).toHaveBeenCalledTimes(1);
|
35
|
35
|
});
|
36
|
36
|
|
37
|
37
|
it('register and handle onNavigationButtonPressed', () => {
|
|
@@ -40,8 +40,8 @@ describe('PrivateEventsListener', () => {
|
40
|
40
|
};
|
41
|
41
|
store.setRefForComponentId('myComponentId', mockRef);
|
42
|
42
|
uut.listenAndHandlePrivateEvents();
|
43
|
|
- expect(nativeEventsReceiver.navigationButtonPressed).toHaveBeenCalledTimes(1);
|
44
|
|
- const callbackFunction = nativeEventsReceiver.navigationButtonPressed.mock.calls[0][0];
|
|
43
|
+ expect(nativeEventsReceiver.registerNavigationButtonPressed).toHaveBeenCalledTimes(1);
|
|
44
|
+ const callbackFunction = nativeEventsReceiver.registerNavigationButtonPressed.mock.calls[0][0];
|
45
|
45
|
expect(callbackFunction).toBeInstanceOf(Function);
|
46
|
46
|
|
47
|
47
|
expect(mockRef.onNavigationButtonPressed).not.toHaveBeenCalled();
|