|
1 |
| -import { afterAll, beforeAll, describe, expect, it } from "vitest"; |
2 |
| -import { server, baseUrl, useMockRequestHandler } from "./fixtures/mock-server.js"; |
3 |
| -import type { paths } from "./fixtures/api.js"; |
4 |
| -import createClient from "../src/index.js"; |
5 |
| -import createFetchClient from "openapi-fetch"; |
6 |
| -import { fireEvent, render, renderHook, screen, waitFor } from "@testing-library/react"; |
7 | 1 | import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
| 2 | +import { fireEvent, render, renderHook, screen, waitFor } from "@testing-library/react"; |
| 3 | +import createFetchClient from "openapi-fetch"; |
8 | 4 | import { Suspense, type ReactNode } from "react";
|
9 | 5 | import { ErrorBoundary } from "react-error-boundary";
|
| 6 | +import { afterAll, beforeAll, describe, expect, it } from "vitest"; |
| 7 | +import createClient from "../src/index.js"; |
| 8 | +import type { paths } from "./fixtures/api.js"; |
| 9 | +import { baseUrl, server, useMockRequestHandler } from "./fixtures/mock-server.js"; |
10 | 10 |
|
11 | 11 | const queryClient = new QueryClient({
|
12 | 12 | defaultOptions: {
|
@@ -466,7 +466,7 @@ describe("client", () => {
|
466 | 466 | });
|
467 | 467 |
|
468 | 468 | const { result } = renderHook(
|
469 |
| - () => client.useInfiniteQuery("get", "/paginated-data", { limit: 3 }, { |
| 469 | + () => client.useInfiniteQuery("get", "/paginated-data", { params: { query: { limit: 3 } } }, { |
470 | 470 | getNextPageParam: (lastPage) => lastPage.nextPage,
|
471 | 471 | initialPageParam: 0
|
472 | 472 | }),
|
@@ -507,7 +507,7 @@ describe("client", () => {
|
507 | 507 | });
|
508 | 508 |
|
509 | 509 | const { result } = renderHook(
|
510 |
| - () => client.useInfiniteQuery("get", "/paginated-data", { limit: 3 }), |
| 510 | + () => client.useInfiniteQuery("get", "/paginated-data", { params: { query: { limit: 3 } } }), |
511 | 511 | { wrapper }
|
512 | 512 | );
|
513 | 513 |
|
|
0 commit comments