-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getByText not working for multiline text #1160
Comments
I found a workaround here: https://stackoverflow.com/questions/55509875/how-to-query-by-text-string-which-contains-html-tags-using-react-testing-library/56859650#56859650 |
I realise I'm commenting on an old issue here but given the test would pass if provided the MatcherOptions to the getByText query I think this issue can be closed.
and also mentioned in the test failure log for the test Failed test code
Failed test output
Example passing test
|
@testing-library/react
version: 13.3.0Using multiline text in getByText fails. Is there a workaround for this?
Failing test
Passing test
The text was updated successfully, but these errors were encountered: