import { ReactElement } from "react";
import { render, RenderOptions } from "@testing-library/react";
import { MantineProvider } from "@mantine/core";

export function renderWithMantine(ui: ReactElement, options?: RenderOptions) {
  return render(ui, {
    wrapper: ({ children }) => (
      <MantineProvider defaultColorScheme="dark">{children}</MantineProvider>
    ),
    ...options,
  });
}
