'react native testing library getByText in nested component

I have a component with the following structure


<T>
    <T>{" "} Hi</T>
how are you ?
</T>

when I do getByText("how are you ?") it doesn't find anything and I couldn't use custom matcher Any suggestion ?



Solution 1:[1]

this worked :


getByText(" Hihow are you ?")

seems weird , but worked

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Khalfoun Mohamed El Mehdi