Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Fix TypeScript return types for query methods #21

Merged
merged 1 commit into from
May 21, 2019

Conversation

lewie9021
Copy link
Contributor

What:

Modified return types for all query methods (e.g. getByTestId) from ReactTestRenderer to NativeTestInstance.

Why:

As noted in #20, for projects using TypeScript, it is confusing to see false type errors within tests when firing events and accessing element props.

How:

Simply modified the type definitions directly. I'm assuming this project is written with normal JavaScript and therefore TypeScript definitions are manually maintained?

Checklist:

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

@codecov-io
Copy link

codecov-io commented May 21, 2019

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #21   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          20     20           
  Lines         262    262           
  Branches       65     65           
=====================================
  Hits          262    262

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 b8e3ca8...136f827. Read the comment docs.

@bcarroll22
Copy link
Collaborator

Thanks for this! @all-contributors[bot] please add @lewie9021 for code.

@allcontributors
Copy link
Contributor

@bcarroll22

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

@bcarroll22 bcarroll22 merged commit ef179c4 into testing-library:master May 21, 2019
@bcarroll22
Copy link
Collaborator

🎉 This PR is included in version 3.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants