Description
Describe the Feature
Add a wrapper
option to render
. This would allow you to provide all the Providers and wrapping components the component under test needs to render. This would improve error messages by not having having all the irrelevant wrapping components in error logs and make update
no longer require you to recreate all the wrapping JSX.
Possible Implementations
wrapper
is already an option in other testing libraries:
https://testing-library.com/docs/react-testing-library/api#wrapper
https://testing-library.com/docs/react-testing-library/setup#custom-render
https://www.native-testing-library.com/docs/api-main#wrapper
https://www.native-testing-library.com/docs/setup#custom-render
A workaround for now is probably to create a helper function/component that contains all the needed providers so it can easily be passed to both render
and update
. But it would be nice for this to be contained in the library and not have individual tests needing to import and use a helper function for update.