Skip to content

fix: queryHelpers.getElementError is not a function #510

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

Merged
merged 3 commits into from
Mar 30, 2020

Conversation

Yama-Tomo
Copy link
Contributor

What:
If you try to call getElementError in a custom query according to the documentation, you will get an error.

Why:
getElementError was removed in #452.

How:
redefine to queryHelpers

Checklist:

NOTE:
I asked a question about this issue. #508
This can be done by require of @testing-library/dom/dist/config, but I'm wondering if that's the official way to do it (It was a question I wanted to ask on that issue ).

Please close this PR if that is official way.

Thanks!

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 29, 2020

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 7fe836d:

Sandbox Source
silly-cloud-ljfto Configuration

@codecov
Copy link

codecov bot commented Mar 29, 2020

Codecov Report

Merging #510 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #510   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          23     23           
  Lines         425    426    +1     
  Branches      101    101           
=====================================
+ Hits          425    426    +1
Impacted Files Coverage Δ
src/query-helpers.js 100% <100%> (ø) ⬆️

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 7741721...7fe836d. Read the comment docs.

kentcdodds
kentcdodds previously approved these changes Mar 30, 2020
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Looks good. Just one small change now that we have this function :)

@kentcdodds kentcdodds merged commit 67370d0 into testing-library:master Mar 30, 2020
@kentcdodds
Copy link
Member

@all-contributors please add @Yama-Tomo for code and tests

@allcontributors
Copy link
Contributor

@kentcdodds

I've put up a pull request to add @Yama-Tomo! 🎉

@kentcdodds
Copy link
Member

🎉 This PR is included in version 7.1.4 🎉

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.

2 participants