Skip to content

fix(types): add fourth param to build findAllBy and findBy queries #574

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 2 commits into from
May 15, 2020

Conversation

mzdunek93
Copy link
Contributor

Fixes #534

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 15, 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 5a9be5f:

Sandbox Source
musing-firefly-g3luo Configuration

@codecov
Copy link

codecov bot commented May 15, 2020

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #574   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines          462       462           
  Branches       114       114           
=========================================
  Hits           462       462           

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 dcad11b...5a9be5f. Read the comment docs.

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 good. Would you be so kind and add a test to types/__tests__/type-tests.ts so that we know this is fixed and won't regress?

@mzdunek93
Copy link
Contributor Author

@eps1lon Sure.

@eps1lon eps1lon added bug Something isn't working TypeScript labels May 15, 2020
@eps1lon eps1lon changed the title fix(TS): add fourth param to build findAllBy and findBy queries fix(types): add fourth param to build findAllBy and findBy queries May 15, 2020
@eps1lon eps1lon merged commit 6491ef1 into testing-library:master May 15, 2020
@eps1lon
Copy link
Member

eps1lon commented May 15, 2020

@mzdunek93 Awesome! Very nice test.

@eps1lon
Copy link
Member

eps1lon commented May 15, 2020

@all-contributors add @mzdunek93 for code

@allcontributors
Copy link
Contributor

@eps1lon

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

@kentcdodds
Copy link
Member

🎉 This PR is included in version 7.5.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@denysdovhan
Copy link

This PR makes those arguments required. They should be optional. @kentcdodds should I open another issue?

@kentcdodds
Copy link
Member

Sure. Or you could open a PR of it's simple

@zorfling
Copy link
Contributor

zorfling commented Sep 24, 2020

@denysdovhan - did this one ever get fixed? It looks like they're still required in master?
https://github.com/testing-library/dom-testing-library/blob/master/types/query-helpers.d.ts#L42

@denysdovhan
Copy link

@zorfling it's still relevant. Now the fourth argument of findAllBy and findBy is required. It should be optional.

@zorfling
Copy link
Contributor

@denysdovhan I've added #794, so hopefully we'll get this one fixed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released TypeScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

findBy* & findAllBy* have wrong argument types for TS
5 participants