-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Change ShallowWrapper.text() trim spaces with same behavior as ReactWrapper.text() #1350
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall
@@ -1633,6 +1633,29 @@ describe('shallow', () => { | |||
matchesRender(<div>></div>); | |||
}); | |||
|
|||
it('should handle spaces with same behavior as ReactWarpper.text()', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReactWarpper.text
→ ReactWrapper.text
In the end ReactWrapper.text() don't do anything to spaces, so the solution was to remove the |
@idanilt would you mind rebasing this on latest master? |
…rapper.text() - remove empty nodes - remove double spaces - remove spaces from beginning or end - not sure all those are all the rule, need to check - couldn't run tests
…ny spaces); fix env on Windows;
ReactWrapper.text() return string with the spaces as is, ShallowWrapper.text() removing double spaces and replacing with regular space (removing doubles as well).
Fixes #1349.