Description
Describe the feature you'd like:
When getByText
fails to find text that has been normalized, the error message should show the normalized version of the string instead of the original.
Currently the error message shows the original un-normalized version. This can be confusing as often that exact text can be seen in the DOM logged out afterwards.
A downside is that it might not be immediately obvious why different text is being shown in the error from what was typed. IMO, if the user is unaware of the default normalization behaviour, this scenario makes it easier to track it down in the docs, and is slightly more representative of why the test is failing.
Describe alternatives you've considered:
Possible alternative is to generically mention normalisation in the error message (alongside text being split onto two lines)
Teachability, Documentation, Adoption, Migration Strategy:
N/A