Skip to content

fix: element error delegation#777

Merged
kentcdodds merged 1 commit into
testing-library:masterfrom
Tismas:pr/consistent-error-reporting
Oct 6, 2020
Merged

fix: element error delegation#777
kentcdodds merged 1 commit into
testing-library:masterfrom
Tismas:pr/consistent-error-reporting

Conversation

@Tismas

@Tismas Tismas commented Oct 6, 2020

Copy link
Copy Markdown
Contributor

What: Using getElementError from configuration in waitFor and singleQuries so that user can customize error reporting consistently.

Why: Currently when configuring getElementError it works differently in for example getByText vs waitFor(() => getByText).

How: Instead of calling prettyDOM directly I changed it so that it uses getElementError from configuration.

Checklist:

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

@codesandbox-ci

codesandbox-ci Bot commented Oct 6, 2020

Copy link
Copy Markdown

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

Sandbox Source
kentcdodds/react-testing-library-examples Configuration

@codecov

codecov Bot commented Oct 6, 2020

Copy link
Copy Markdown

Codecov Report

Merging #777 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #777   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines          702       703    +1     
  Branches       183       183           
=========================================
+ Hits           702       703    +1     
Impacted Files Coverage Δ
src/query-helpers.js 100.00% <100.00%> (ø)
src/wait-for.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 9b08b70...db2115e. Read the comment docs.

@kentcdodds kentcdodds left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perfect. Thank you 👏

@kentcdodds
kentcdodds merged commit 0d7294f into testing-library:master Oct 6, 2020
@kentcdodds

Copy link
Copy Markdown
Member

@all-contributors please add @Tismas for code and tests

@allcontributors

Copy link
Copy Markdown
Contributor

@kentcdodds

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

@testing-library-bot

Copy link
Copy Markdown

🎉 This PR is included in version 7.24.5 🎉

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.

4 participants