import React, { FC, ReactElement } from "react"; import { render, RenderOptions } from "@testing-library/react"; import LocalLogicClient from "@local-logic/client"; import { LocalLogicProvider } from "../context"; interface WrapperProps { children: React.ReactNode; } const client = LocalLogicClient("123"); const frClient = LocalLogicClient("123", { locale: "fr" }); const Wrapper: FC = ({ children }) => ( {children} ); const FRWrapper: FC = ({ children }) => ( {children} ); // eslint-disable-next-line @typescript-eslint/no-explicit-any const customRender: any = ( ui: ReactElement, options?: Omit ) => render(ui, { wrapper: ({ children }) => Wrapper({ children }), ...options, }); export * from "@testing-library/react"; export { customRender as render, Wrapper as wrapper, FRWrapper as frWrapper };