Skip to content

Instantly share code, notes, and snippets.

@paigen11
Created March 28, 2020 22:54
Show Gist options
  • Save paigen11/cab58adf0e5f96ff2bc1b446e3da4b4c to your computer and use it in GitHub Desktop.
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.
<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