Closed precious-void closed 1 month ago
@precious-void thank you for noting and fixing that. BTW have you spotted that edge case while actually writing tests? or you just figured out that we are missing edge case support?
@mdjastrzebski hey, thanks for a quick reply, yeah, I had spotted it while writing tests and couldn't understand why it would throw an error. As a workaround I'm temporarily not using this flag.
This issue has been fixed in v12.5.1 🎉
Describe the bug
When immediately calling setState in useEffect and the component is rendered with
unstable_validateStringsRenderedWithinText
parameter, the following error is thrown:Expected behavior
I would expect it not to throw, as without this unstable parameter it does work.
Steps to Reproduce
I added this test in https://github.com/callstack/react-native-testing-library/blob/bab4097836aa903ff4cc3cd441bf99252f623cf5/src/__tests__/render-string-validation.test.tsx And it does fail even there.
Versions
npmPackages: react: 18.2.0 => 18.2.0 react-native: 0.74.1 => 0.74.1 react-test-renderer: 18.2.0 => 18.2.0