The best way to control Claude Code, Codex and more from any computer or phone
Use QueryClient to execute checkpoint diff query in test
- run `checkpointDiffQueryOptions` through `QueryClient.fetchQuery` - validate `getCheckpointDiff` call via React Query execution path
Julius Marminge committed
Feb 18, 2026 at 02:51 UTC
200e43e44c52e0f819f7162a6a3fb7551a9ee013
1 file changed
+3
-1
apps/web/src/lib/providerReactQuery.test.ts
+3
-1
@@ -1,4 +1,5 @@
1
import type { NativeApi } from "@t3tools/contracts";
2
+import { QueryClient } from "@tanstack/react-query";
3
import { describe, expect, it, vi } from "vitest";
4
import { checkpointDiffQueryOptions, providerQueryKeys } from "./providerReactQuery";
5
@@ -42,7 +43,8 @@ describe("checkpointDiffQueryOptions", () => {
43
cacheScope: "turn:abc",
44
});
45
45
- await options.queryFn();
46
+ const queryClient = new QueryClient();
47
+ await queryClient.fetchQuery(options);
48
49
expect(getCheckpointDiff).toHaveBeenCalledWith({
50
sessionId: "session-id",