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 22 23 24 25 | 21x 73x 21x 72x | // @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"
type Props = {
+children: React$Node
}
const AllTheProviders = ({ children }: Props) => (
<ThemeProvider theme={theme}>{children}</ThemeProvider>
)
const customRender = (ui: any, options?: any): any =>
render(ui, { wrapper: AllTheProviders, ...options })
// re-export everything
export * from "@testing-library/react"
// override render method
export { customRender as render }
|