-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
(Super) debatable, but we might consider adding testing functionality that will allow string matching while ignoring whitespace.
We have been looking at how to best roll in updates to date localizations that have (in a few cases) updated typical whitespace (U+0020) to be NBSP (non breaking space, U+202F). The localizations team confirmed this is WAI, and in some locales (like French) is a required typography rule.
We have found users' might experience this update like this:
Which would be super frustrating to debug! We are working on improving the error message here to specify the whitespace character in the error message, #177479, but also discussed that in some cases (maybe not this particular case) users might like a test method that allows them to match strings without attention paid to whitespace. Like this:
expect(testString, matchesIgnoringWhitespace(expectedString));A little bit more context on this from the localizations team is available in b/442629033