From 200e43e44c52e0f819f7162a6a3fb7551a9ee013 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 18 Feb 2026 02:51:10 -0800 Subject: [PATCH] Use QueryClient to execute checkpoint diff query in test - run `checkpointDiffQueryOptions` through `QueryClient.fetchQuery` - validate `getCheckpointDiff` call via React Query execution path --- apps/web/src/lib/providerReactQuery.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/web/src/lib/providerReactQuery.test.ts b/apps/web/src/lib/providerReactQuery.test.ts index 45d822aae8e44686f4259223ef776601976ed7f3..3652414b371333767f863c8c509c86b2b3948a15 100644 --- a/apps/web/src/lib/providerReactQuery.test.ts +++ b/apps/web/src/lib/providerReactQuery.test.ts @@ -1,4 +1,5 @@ import type { NativeApi } from "@t3tools/contracts"; +import { QueryClient } from "@tanstack/react-query"; import { describe, expect, it, vi } from "vitest"; import { checkpointDiffQueryOptions, providerQueryKeys } from "./providerReactQuery"; @@ -42,7 +43,8 @@ describe("checkpointDiffQueryOptions", () => { cacheScope: "turn:abc", }); - await options.queryFn(); + const queryClient = new QueryClient(); + await queryClient.fetchQuery(options); expect(getCheckpointDiff).toHaveBeenCalledWith({ sessionId: "session-id", -- 2.54.0