|
@@ -45,4 +45,16 @@ describe('EventsRegistry', () => {
|
45
|
45
|
expect(mockNativeEventsReceiver.registerComponentDidDisappear).toHaveBeenCalledTimes(1);
|
46
|
46
|
expect(mockNativeEventsReceiver.registerComponentDidDisappear).toHaveBeenCalledWith(cb);
|
47
|
47
|
});
|
|
48
|
+
|
|
49
|
+ it('exposes interaction event', () => {
|
|
50
|
+ const subscription = {};
|
|
51
|
+ const cb = jest.fn();
|
|
52
|
+ mockNativeEventsReceiver.registerInteraction.mockReturnValueOnce(subscription);
|
|
53
|
+
|
|
54
|
+ const result = uut.interaction(cb);
|
|
55
|
+
|
|
56
|
+ expect(result).toBe(subscription);
|
|
57
|
+ expect(mockNativeEventsReceiver.registerInteraction).toHaveBeenCalledTimes(1);
|
|
58
|
+ expect(mockNativeEventsReceiver.registerInteraction).toHaveBeenCalledWith(cb);
|
|
59
|
+ });
|
48
|
60
|
});
|