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
Copy file name to clipboardExpand all lines: tests/unit/onyxTest.ts
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1077,6 +1077,26 @@ describe('Onyx', () => {
1077
1077
);
1078
1078
});
1079
1079
1080
+
it('should not call the callback with undefined to a collection subscriber using waitForCollectionCallback when deleting one of the collection keys',()=>{
1081
+
constmockCallback=jest.fn();
1082
+
1083
+
// Given an Onyx.connect call with waitForCollectionCallback=true
1084
+
connection=Onyx.connect({
1085
+
key: ONYX_KEYS.COLLECTION.TEST_POLICY,
1086
+
waitForCollectionCallback: true,
1087
+
callback: mockCallback,
1088
+
});
1089
+
return(
1090
+
waitForPromisesToResolve()
1091
+
// When mergeCollection is called with an updated collection
0 commit comments