Created
March 28, 2020 22:54
-
-
Save paigen11/cab58adf0e5f96ff2bc1b446e3da4b4c to your computer and use it in GitHub Desktop.
Example of how to use getByText's fuzzy match in React Testing Library.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div>Hi there!</div> | |
getByText(container, 'i the', { exact: false }); | |
getByText(container, 'hi there', { exact: false }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment