Created
December 28, 2022 11:34
-
-
Save CodeNinja47/42da2fe7423928b3c0f4caaa981a2270 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { render } from '@testing-library/react'; | |
| /** | |
| * | |
| * @param {React component} any React component | |
| * @returns React component wrapped around with the store | |
| */ | |
| const Provider = ({ children }) => { | |
| return <> | |
| {children} | |
| </>; | |
| }; | |
| const customRender = (ui, options) => render(ui, { wrapper: Provider, ...options }); | |
| // override render method | |
| export { customRender }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment