File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
packages/query-db-collection/tests Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -431,7 +431,9 @@ describe(`QueryCollection`, () => {
431
431
} )
432
432
433
433
// Verify queryFn was called with the correct context, including the meta object
434
- expect ( queryFn ) . toHaveBeenCalledWith ( expect . objectContaining ( { meta } ) )
434
+ expect ( queryFn ) . toHaveBeenCalledWith (
435
+ expect . objectContaining ( { meta : { ...meta , tsDb : { } } } )
436
+ )
435
437
} )
436
438
437
439
describe ( `Select method testing` , ( ) => {
@@ -696,6 +698,20 @@ describe(`QueryCollection`, () => {
696
698
697
699
// Test case 1: Default behavior (undefined return) should trigger refetch
698
700
const optionsDefault = queryCollectionOptions ( configDefault )
701
+
702
+ // Call sync to force the query to be created
703
+ optionsDefault . sync . sync ( {
704
+ begin : ( ) => { } ,
705
+ write : ( ) => { } ,
706
+ commit : ( ) => { } ,
707
+ collection : {
708
+ subscriberCount : 1 ,
709
+ on : ( ) => {
710
+ return ( ) => { }
711
+ } ,
712
+ } ,
713
+ } as any )
714
+
699
715
await optionsDefault . onInsert ! ( insertMockParams )
700
716
701
717
// Verify handler was called and refetch was triggered
You can’t perform that action at this time.
0 commit comments