@@ -1071,7 +1071,7 @@ describe('Onyx', () => {
10711071 . then ( ( ) => {
10721072 // Then we expect the callback to be called only once and the initial stored value to be initialCollectionData
10731073 expect ( mockCallback ) . toHaveBeenCalledTimes ( 1 ) ;
1074- expect ( mockCallback ) . toHaveBeenCalledWith ( initialCollectionData , undefined , undefined ) ;
1074+ expect ( mockCallback ) . toHaveBeenCalledWith ( initialCollectionData , ONYX_KEYS . COLLECTION . TEST_CONNECT_COLLECTION , undefined ) ;
10751075 } ) ;
10761076 } ) ;
10771077
@@ -1097,7 +1097,7 @@ describe('Onyx', () => {
10971097 expect ( mockCallback ) . toHaveBeenCalledTimes ( 2 ) ;
10981098
10991099 // AND the value for the first call should be null since the collection was not initialized at that point
1100- expect ( mockCallback ) . toHaveBeenNthCalledWith ( 1 , undefined , undefined , undefined ) ;
1100+ expect ( mockCallback ) . toHaveBeenNthCalledWith ( 1 , undefined , ONYX_KEYS . COLLECTION . TEST_POLICY , undefined ) ;
11011101
11021102 // AND the value for the second call should be collectionUpdate since the collection was updated
11031103 expect ( mockCallback ) . toHaveBeenNthCalledWith ( 2 , collectionUpdate , ONYX_KEYS . COLLECTION . TEST_POLICY , collectionUpdate ) ;
@@ -1155,7 +1155,7 @@ describe('Onyx', () => {
11551155 expect ( mockCallback ) . toHaveBeenCalledTimes ( 2 ) ;
11561156
11571157 // AND the value for the second call should be collectionUpdate
1158- expect ( mockCallback ) . toHaveBeenNthCalledWith ( 1 , undefined , undefined , undefined ) ;
1158+ expect ( mockCallback ) . toHaveBeenNthCalledWith ( 1 , undefined , ONYX_KEYS . COLLECTION . TEST_POLICY , undefined ) ;
11591159 expect ( mockCallback ) . toHaveBeenNthCalledWith ( 2 , collectionUpdate , ONYX_KEYS . COLLECTION . TEST_POLICY , {
11601160 [ `${ ONYX_KEYS . COLLECTION . TEST_POLICY } 1` ] : collectionUpdate . testPolicy_1 ,
11611161 } ) ;
@@ -1271,7 +1271,7 @@ describe('Onyx', () => {
12711271 { onyxMethod : Onyx . METHOD . MERGE_COLLECTION , key : ONYX_KEYS . COLLECTION . TEST_UPDATE , value : { [ itemKey ] : { a : 'a' } } as GenericCollection } ,
12721272 ] ) . then ( ( ) => {
12731273 expect ( collectionCallback ) . toHaveBeenCalledTimes ( 2 ) ;
1274- expect ( collectionCallback ) . toHaveBeenNthCalledWith ( 1 , undefined , undefined , undefined ) ;
1274+ expect ( collectionCallback ) . toHaveBeenNthCalledWith ( 1 , undefined , ONYX_KEYS . COLLECTION . TEST_UPDATE , undefined ) ;
12751275 expect ( collectionCallback ) . toHaveBeenNthCalledWith ( 2 , { [ itemKey ] : { a : 'a' } } , ONYX_KEYS . COLLECTION . TEST_UPDATE , { [ itemKey ] : { a : 'a' } } ) ;
12761276
12771277 expect ( testCallback ) . toHaveBeenCalledTimes ( 2 ) ;
@@ -1538,7 +1538,7 @@ describe('Onyx', () => {
15381538 . then ( ( ) => {
15391539 expect ( collectionCallback ) . toHaveBeenCalledTimes ( 3 ) ;
15401540 expect ( collectionCallback ) . toHaveBeenNthCalledWith ( 1 , { [ cat ] : initialValue } , ONYX_KEYS . COLLECTION . ANIMALS , { [ cat ] : initialValue } ) ;
1541- expect ( collectionCallback ) . toHaveBeenNthCalledWith ( 2 , { [ cat ] : initialValue } , undefined , undefined ) ;
1541+ expect ( collectionCallback ) . toHaveBeenNthCalledWith ( 2 , { [ cat ] : initialValue } , ONYX_KEYS . COLLECTION . ANIMALS , undefined ) ;
15421542 expect ( collectionCallback ) . toHaveBeenNthCalledWith ( 3 , collectionDiff , ONYX_KEYS . COLLECTION . ANIMALS , { [ cat ] : initialValue , [ dog ] : { name : 'Rex' } } ) ;
15431543
15441544 // Cat hasn't changed from its original value, expect only the initial connect callback
0 commit comments