-
Notifications
You must be signed in to change notification settings - Fork 471
feat: simplified the getByText error message #945
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
feat: simplified the getByText error message #945
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit a653961:
|
expect(() => getByText('LucyRicardo')).toThrowErrorMatchingInlineSnapshot(` | ||
"Unable to find an element with the text: LucyRicardo. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. | ||
"Unable to find an element using the provided matcher.The matcher is - LucyRicardo This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. |
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.
This is less descriptive to me. Before I knew it was "text". Now it sounds like there's named matcher called "LucyRicardo" when it's just text.
Codecov Report
@@ Coverage Diff @@
## main #945 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 26 26
Lines 953 957 +4
Branches 289 293 +4
=========================================
+ Hits 953 957 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Closing since this PR appears to be abandoned |
What:
Updated the error message returned from the getByText query to be more descriptive
#732
Why:
How:
Checklist:
docs site