Skip to content

fix(types): make third and fourth params optional for findAllBy and findBy built queries #794

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

Conversation

zorfling
Copy link
Contributor

@zorfling zorfling commented Oct 20, 2020

What: Updated types for built findBy / findAllBy custom queries and added extra type tests

Why: A fix made in PR #574 / Issue #534 added these parameters but accidentally made them required (see #574 (comment))

How: Updated the types in query-helpers.d.ts to mimic the built-in types in queries.d.ts, and added more type tests to ensure it won't regress.

Checklist:

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

@codesandbox-ci
Copy link

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

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

@codecov
Copy link

codecov bot commented Oct 20, 2020

Codecov Report

Merging #794 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #794   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines          725       725           
  Branches       188       190    +2     
=========================================
  Hits           725       725           
Impacted Files Coverage Δ
src/helpers.js 100.00% <0.00%> (ø)
src/get-node-text.js 100.00% <0.00%> (ø)
src/queries/label-text.js 100.00% <0.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 53829b8...f9adb74. Read the comment docs.

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.

Thanks 👍

@kentcdodds kentcdodds merged commit 9387b08 into testing-library:master Oct 20, 2020
@kentcdodds
Copy link
Member

@all-contributors please add @zorfling for code

@allcontributors
Copy link
Contributor

@kentcdodds

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

@testing-library-bot
Copy link

🎉 This PR is included in version 7.26.2 🎉

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.

3 participants