Files
frontend/src/test/query.tsx
T
ksv741 72d7835227 chore: finish frontend ESLint migration #18
Enable every plugin recommended preset and replace Biome with ESLint formatting.

Preserve API contracts and JSX whitespace; verify source, tests, builds and tooling.
2026-09-28 16:36:40 +03:00

25 lines
622 B
TypeScript

import type { FC, PropsWithChildren } from "react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
function createQueryWrapper(queryClient = createTestQueryClient()) {
const QueryWrapper: FC<PropsWithChildren> = props => (
<QueryClientProvider client={queryClient}>
{props.children}
</QueryClientProvider>
);
return { queryClient, wrapper: QueryWrapper };
}
function createTestQueryClient(): QueryClient {
return new QueryClient({
defaultOptions: {
mutations: { retry: false },
queries: { retry: false },
},
});
}
export { createQueryWrapper, createTestQueryClient };