0

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 ?

  • You can use regex in the `getByText()`. eg `getByText(/Hi/i);`. This helps when there is nested Text views. Regex is a good way to match what you want to match in the page. – Arjun Nayak Jun 28 '23 at 14:53

1 Answers1

1

this worked :


getByText(" Hihow are you ?")

seems weird , but worked