testing-library / react-testing-library

🐐 Simple and complete React DOM testing utilities that encourage good testing practices.
https://testing-library.com/react
MIT License
18.84k stars 1.09k forks source link

fix: Stop restricting `container` option based on `hydrate` #1313

Closed eps1lon closed 2 months ago

eps1lon commented 2 months ago

Closes https://github.com/testing-library/react-testing-library/issues/1312 Closes https://github.com/testing-library/react-testing-library/issues/1311

It's really not worth it to have such extensive types just to restrict container properly. Especially because it makes composing render and renderHook so hard. And we do want to encourage wrapping render in your tests.

codesandbox-ci[bot] commented 2 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f5f9f9ec180064f4d2976cd4dd43ccb9ee030ce0:

Sandbox Source
react-testing-library-examples Configuration