Use QueryClient to execute checkpoint diff query in test

- run `checkpointDiffQueryOptions` through `QueryClient.fetchQuery`
- validate `getCheckpointDiff` call via React Query execution path
This commit is contained in:
Julius Marminge committed 2026-02-18 02:51:10 -08:00
1 parent 4768668637
commit 8e3193c277
1 file changed
+3 -1
+3 -1
View File
@@ -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",