import React, {FC} from "react";
import {render} from "@testing-library/react";
import {ThemeProvider} from "styled-components";
import theme from "./theme/index";


const Wrapper: FC = ({children}) => (
   <ThemeProvider theme={theme}>{children}</ThemeProvider>
);

const customRender = (ui: any, options = {}) => {
   return render(ui, {
      wrapper: Wrapper,
      ...options,
   });
};

export * from "@testing-library/react";
export {customRender as render};
