Skip to content
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

Improve error messages #1185

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

rluvaton
Copy link

@rluvaton rluvaton commented Oct 26, 2022

What: Improve the error messages

Why: #732

How: updated the getMultipleError, getMissingError

Checklist:

  • Documentation added to the
    docs site
  • Tests
  • TypeScript definitions updated
  • Ready to be merged

Now, for custom matchers functions we would use the:

  1. customMatcherText property on the function
  2. the function name
  3. [anonymous function]

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 26, 2022

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 56dd0e4:

Sandbox Source
react-testing-library-examples Configuration

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Looks like the changes are not fully covered by tests.

Can you structure this PR into multiple commits that make it easier to spot how error messages were changed (e.g. one commit with new tests and existing behavior and the next commit with changed behavior and updated tests)?

@rluvaton
Copy link
Author

rluvaton commented Oct 27, 2022

Hey, I did not finish (this is why I haven't checked the ready to merge checkbox) 😄
I'll convert this into a draft

@rluvaton rluvaton marked this pull request as draft October 27, 2022 16:27
@rluvaton
Copy link
Author

@eps1lon for some reason the tests fail on get throws a useful error message › ByText › Multiple elements do you know why?

the snapshots are the same

image

also, how do you want me to organize my changes?

@rluvaton
Copy link
Author

rluvaton commented Dec 5, 2022

@eps1lon tagging you again in case you missed that

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

Successfully merging this pull request may close these issues.

None yet

2 participants