You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @davydspotnana , this issue is currently being adressed (see #937 for more information). You can refer to this comment #937 (comment) for a workaround by mocking the trans component. Hope this helps !
@retyui The root cause is the same in both issues. RNTL can only detect text directly inside <Text> components. If you have any intermediate component (even if it doesn't appear in the renderer) RNTL will be confused and won't be able to match it.
We agree that mocking is not a long term solution, we're still trying to find a real fix, there's some progress in #967 but it's a non trivial issue.
Describe the bug
I'm using a
<Trans/>
component fromreact-i18next
module to translate complex react elements (without mocking it)It works well in React Native runtime:

debug()
text that I'm trying to find existsExpected behavior
Steps to Reproduce
Screenshots
Full code you find here https://github.com/retyui/testing-library-and-i18next-issue
Versions
The text was updated successfully, but these errors were encountered: