( queryClient: QueryClient, chats: TypesGen.Chat[], opts?: InfiniteChatsTestOptions, )
| 86 | |
| 87 | /** Seed the infinite chats cache in the format TanStack Query expects. */ |
| 88 | const seedInfiniteChats = ( |
| 89 | queryClient: QueryClient, |
| 90 | chats: TypesGen.Chat[], |
| 91 | opts?: InfiniteChatsTestOptions, |
| 92 | ) => { |
| 93 | queryClient.setQueryData<InfiniteData>(infiniteChatsKey(opts), { |
| 94 | pages: [chats], |
| 95 | pageParams: [0], |
| 96 | }); |
| 97 | }; |
| 98 | |
| 99 | /** Read chats back from the infinite query cache. */ |
| 100 | const readInfiniteChats = ( |
no test coverage detected