import React from "react" ; import { ThemeProvider } from "styled-components" ; import { render , RenderResult } from "@testing-library/react" ; import theme from "../styles/theme" ; export function renderWithStyledTheme ( component , renderFunction = render , options ? ) { return { ... renderFunction ( < ThemeProvider theme = { theme } > { component } < /ThemeProvider>, options), } ; }