import React from 'react' ; import { render , RenderOptions , RenderResult } from '@testing-library/react' ; import { ThemeProvider } from 'styled-components' ; import theme from '@weco/common/views/themes/default' ; const AllTheProviders = ( { children } ) => { return < ThemeProvider theme = { theme } > { children } < /ThemeProvider>; } ; const customRender = ( ui , options ? ) : RenderResult => render ( ui , { wrapper : AllTheProviders , ... options } ) ; export * from '@testing-library/react' ; export { customRender as render } ;