callstack / react-native-testing-library

🦉 Simple and complete React Native testing utilities that encourage good testing practices.
https://callstack.github.io/react-native-testing-library/
MIT License
3.01k stars 264 forks source link

fix: immediate setState in useEffect for unstable_validateStringsRenderedWithinText #1612

Closed precious-void closed 1 month ago

precious-void commented 1 month ago

Summary

Referencing: #1611 Fixed by checking for the renderer to be initialized for the first update received from the Profiler onRender

Test plan

Implemented 2 test for that case:

  1. Positive test that was failing before this implemented fix.
  2. Negative test to check that error is still thrown when text is rendered not inside of the Text tag
mdjastrzebski commented 1 month ago

This PR has been released with v12.5.1 🎉