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

feat: add name hint to missing error in find by queries #1143

Conversation

dolevoper
Copy link
Contributor

@dolevoper dolevoper commented Jul 4, 2022

What:
Resolves: #970

Checklist:

  • Documentation added to the
    docs site - N/A
  • Tests
  • TypeScript definitions updated - N/A
  • Ready to be merged

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 4, 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 9cd3e2b:

Sandbox Source
react-testing-library-examples Configuration

@codecov
Copy link

codecov bot commented Jul 4, 2022

Codecov Report

Merging #1143 (9cd3e2b) into main (29a17cb) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main     #1143   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines          985       987    +2     
  Branches       325       325           
=========================================
+ Hits           985       987    +2     
Flag Coverage Δ
node-12 100.00% <100.00%> (ø)
node-14 100.00% <100.00%> (ø)
node-16 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/queries/role.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29a17cb...9cd3e2b. Read the comment docs.

Copy link
Member

@MatanBobi MatanBobi left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good to me.
@eps1lon wdyt?

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.

We should be careful with adding more info though. Your test runner should still point to the callsite when this query fails where you have all the information.

@eps1lon eps1lon merged commit 9b83f01 into testing-library:main Jul 10, 2022
@eps1lon
Copy link
Member

eps1lon commented Jul 10, 2022

@all-contributors add @dolevoper for code

@allcontributors
Copy link
Contributor

@eps1lon

I've put up a pull request to add @dolevoper! 🎉

@github-actions
Copy link

🎉 This PR is included in version 8.15.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.

Throw better error message by findByRole query
3 participants