diff --git a/src/react/hooks/__tests__/useBackgroundQuery.test.tsx b/src/react/hooks/__tests__/useBackgroundQuery.test.tsx index a2a29a9db69..104baa66c54 100644 --- a/src/react/hooks/__tests__/useBackgroundQuery.test.tsx +++ b/src/react/hooks/__tests__/useBackgroundQuery.test.tsx @@ -697,8 +697,11 @@ describe('useBackgroundQuery', () => { } ); - expect(directSuspenseCache['queryRefs'].size).toBe(1); - expect(contextSuspenseCache['queryRefs'].size).toBe(0); + expect(directSuspenseCache).toHaveSuspenseCacheEntryUsing(client, query); + expect(contextSuspenseCache).not.toHaveSuspenseCacheEntryUsing( + client, + query + ); }); it('passes context to the link', async () => {