import { render, screen } from "@testing-library/react"; import React, { useState } from "react"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; const queryClient = new QueryClient(); describe("Minimal render test", () => { it("renders a simple component without error", () => { function SimpleComponent() { const [count, setCount] = useState(0); return (
Hello World
); } render( ); expect(screen.getByText("Hello World")).toBeInTheDocument(); expect(screen.getByText("Count: 0")).toBeInTheDocument(); }); });