You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using testcafe-testing-library, text normalization does not work as documented (emphasis mine):
Normalization
Before running any matching logic against text in the DOM, DOM Testing Library automatically normalizes that text. By default, normalization consists of trimming whitespace from the start and end of text, and collapsing multiple adjacent whitespace characters within the string into a single space.
To Reproduce
Put this content into your html file:
Describe the bug
When using testcafe-testing-library, text normalization does not work as documented (emphasis mine):
To Reproduce
Put this content into your html file:
And put this code into your test file:
Expected behavior
This test passes.
Actual behavior
This test fails due to whitespace differences:
Desktop (please complete the following information):
Additional context
As a workaround, I could manually trim the
innerText
, but according to the documentation, I shouldn't have to.Although I haven't tested this, this bug implies that custom normalizers passed into the query functions will be ignored.
The text was updated successfully, but these errors were encountered: