Skip to content

Fix toHaveTextContent to be case-sensitive #72

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

Merged
merged 2 commits into from
Dec 4, 2018
Merged

Fix toHaveTextContent to be case-sensitive #72

merged 2 commits into from
Dec 4, 2018

Conversation

lourenci
Copy link
Contributor

@lourenci lourenci commented Dec 3, 2018

What:
Change .toHaveTextContent to be case-sensitive. It closes #71.

Why:
This is the expected usage. If the user wants insensitivity, he should do through Regexp.

How:
Is was removed the .toLowerCase from the match utils function.

Checklist:

  • Documentation
  • Tests
  • Updated Type Definitions
  • Ready to be merged
  • Added myself to contributors table

Copy link
Member

@gnapse gnapse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, except for one detail I commented on.

Also, if I'm not mistaken, this would be a breaking change right? I want to have that clear before merging this.

@lourenci
Copy link
Contributor Author

lourenci commented Dec 4, 2018

Yes, it's a breaking change. Some tests written believing in insensitivity will break.

@gnapse gnapse merged commit 6a50378 into testing-library:master Dec 4, 2018
@gnapse
Copy link
Member

gnapse commented Dec 4, 2018

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should .toHaveTextContent be case-sensitive?
2 participants