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

Fix matcher when values don't match types #62

Merged
merged 2 commits into from
Oct 10, 2019

Conversation

jeffreyffs
Copy link
Contributor

What: We added the ability to query by boolean for switches (as they have a value that is on/off). It broke a few things, mainly Switches being rendered alongside other components that get queried by displayValue (TextInput/Picker).

Why: We want to be able to test components that contain switches and TextInputs/Pickers

How: Don't try and normalize boolean values

Checklist:

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

Not 100% sure this is the correct way to go about this, but it works and passes the test cases I added that were breaking for me in my project.

@codecov
Copy link

codecov bot commented Sep 26, 2019

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #62   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          20     20           
  Lines         266    266           
  Branches       67     67           
=====================================
  Hits          266    266
Impacted Files Coverage Δ
src/lib/matches.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 a72fb3f...de7502d. Read the comment docs.

@bcarroll22 bcarroll22 merged commit 55c9716 into testing-library:master Oct 10, 2019
@bcarroll22
Copy link
Collaborator

🎉 This PR is included in version 4.0.13 🎉

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.

2 participants