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:
1 parent
4768668637
commit
8e3193c277
1 file changed
+3
-1
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user