import { render, screen } from "@testing-library/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";

import { App } from "./app";
import "./i18n";

test("mounts and routes to a known screen", async () => {
  const qc = new QueryClient({ defaultOptions: { queries: { retry: false } } });

  render(
    <QueryClientProvider client={qc}>
      <App />
    </QueryClientProvider>,
  );

  expect(await screen.findByText(/object|föremål|sign in|logga in/i)).toBeInTheDocument();
});
