react-testing-library icon indicating copy to clipboard operation
react-testing-library copied to clipboard

Drop usage of react-dom/test-utils

Open eps1lon opened this issue 1 year ago • 2 comments

BREAKING CHANGE The legacyRoot option is no longer supported now that ReactDOM.render has been removed from React. There is no alternative.

To ensure compatibility with React Testing Library 15, make sure you're not using the legacyRoot option in any of your calls to render from React Testing Library.

React 18 is still supported but you will see deprecation warnings from react-dom/test-utils. Either suppress these warnings or switch to React 19.

eps1lon avatar Jan 30 '24 21:01 eps1lon

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 997c8c1e4b86dee664f3f219706092cc32582dd8:

Sandbox Source
React Configuration
react-testing-library-examples Configuration

codesandbox-ci[bot] avatar Jan 30 '24 21:01 codesandbox-ci[bot]

Thanks Sebastian. Is there any documentation about this change? Are they just deprecating the module?

MatanBobi avatar Jan 31 '24 08:01 MatanBobi

Thanks Sebastian. Is there any documentation about this change? Are they just deprecating the module?

This is the related doc.

cayter avatar Apr 01 '24 00:04 cayter

Thanks Sebastian. Is there any documentation about this change? Are they just deprecating the module?

This is the related doc.

Thanks.. This was created by @eps1lon himself :)

https://github.com/reactjs/react.dev/blob/main/src/content/warnings/react-dom-test-utils.md

MatanBobi avatar Apr 01 '24 13:04 MatanBobi

Favoring https://github.com/testing-library/react-testing-library/pull/1294 which adds React 19 support in a SemVer MINOR.

eps1lon avatar Apr 08 '24 12:04 eps1lon