( queryClient: QueryClient, chatId: string, )
| 1675 | |
| 1676 | describe("sidebar title race condition", () => { |
| 1677 | const readTitle = ( |
| 1678 | queryClient: QueryClient, |
| 1679 | chatId: string, |
| 1680 | ): string | undefined => { |
| 1681 | const data = queryClient.getQueryData<InfiniteData>(infiniteChatsTestKey); |
| 1682 | return data?.pages.flat().find((c) => c.id === chatId)?.title; |
| 1683 | }; |
| 1684 | |
| 1685 | it("in-flight refetch overwrites a WebSocket title update (the bug)", async () => { |
| 1686 | const queryClient = createTestQueryClient(); |