how are you ? when I do getByText("how are you ?") it doesn't find anything a" /> how are you ? when I do getByText("how are you ?") it doesn't find anything a" /> how are you ? when I do getByText("how are you ?") it doesn't find anything a"/>

react native testing library getByText in nested component

602 Views Asked by At

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 ?

1

There are 1 best solutions below

0
Khalfoun Mohamed El Mehdi On BEST ANSWER

this worked :


getByText(" Hihow are you ?")

seems weird , but worked