Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 7x 10x 7x 10x | // @flow
import "@testing-library/jest-dom"
import React from "react"
import ThemeProvider from "styles/theme/Provider"
import { render } from "@testing-library/react"
import theme from "styles/theme"
const AllTheProviders = ({ children }) => {
return <ThemeProvider theme={theme}>{children}</ThemeProvider>
}
const customRender = (ui: any, options: any) =>
render(ui, { wrapper: AllTheProviders, ...options })
// re-export everything
export * from "@testing-library/react"
// override render method
export { customRender as render }
|