You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expect(fakeImpressionsCache.track.mock.calls[0][0]).toEqual([imp1,imp2,imp3]);// Should call the storage track method once we invoke .track() method, passing queued params in a sequence.
72
+
expect(fakeImpressionsCache.track.mock.calls[0][0]).toEqual([imp1,imp2]);// Should call the storage track method once we invoke .track() method, passing impressions with `track` enabled
76
73
});
77
74
78
75
test('Tracked impressions should be sent to impression listener and integration manager when we invoke .track()',(done)=>{
expect(fakeIntegrationsManager.handleImpression).not.toBeCalled();// The integrations manager handleImpression method should not be invoked if we haven't tracked impressions.
94
91
95
92
// We signal that we actually want to track the queued impressions.
expect(fakeImpressionsCache.track.mock.calls[0][0]).toEqual([fakeImpression,fakeImpression2]);// Even with a listener, impression should be sent to the cache
95
+
expect(fakeImpressionsCache.track.mock.calls[0][0]).toEqual([fakeImpression]);// Even with a listener, impressions (with `track` enabled) should be sent to the cache
99
96
expect(fakeListener.logImpression).not.toBeCalled();// The listener should not be executed synchronously.
100
97
expect(fakeIntegrationsManager.handleImpression).not.toBeCalled();// The integrations manager handleImpression method should not be executed synchronously.
0 commit comments