Skip to content
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

fix: check equality in toHaveDisplayValue (fix #290) #319

Merged
merged 2 commits into from Dec 30, 2020
Merged

Conversation

nickmccurdy
Copy link
Member

@nickmccurdy nickmccurdy commented Dec 21, 2020

What: Uses an equality check on strings passed to toHaveDisplayValue

Why: #290

How: Use this.equals (equality check) instead of matches (which uses includes for substrings)

Checklist:

  • Documentation N/A
  • Tests
  • Updated Type Definitions N/A
  • Ready to be merged

@codecov
Copy link

codecov bot commented Dec 21, 2020

Codecov Report

Merging #319 (1829dde) into master (2927c95) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #319   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines          533       534    +1     
  Branches       194       197    +3     
=========================================
+ Hits           533       534    +1     
Impacted Files Coverage Δ
src/to-have-display-value.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 2927c95...1829dde. Read the comment docs.

Copy link
Member

@gnapse gnapse left a comment

Choose a reason for hiding this comment

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

@nickmccurdy technically this is a breaking change, although whoever was relying on this can be considered as having been relying on a bug, so I'm not sure.

@nickmccurdy
Copy link
Member Author

nickmccurdy commented Dec 29, 2020

It seems like the existing behavior is inaccurate according to the documentation (see #290 (comment)). As users are supposed to follow the documented API, I would consider this to be a semver minor/patch bug fix, not a major release.

@gnapse gnapse merged commit 4179117 into master Dec 30, 2020
@gnapse gnapse deleted the pr/fix-290 branch December 30, 2020 01:40
@github-actions
Copy link

🎉 This PR is included in version 5.11.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickmccurdy
Copy link
Member Author

@all-contributors add @nickmccurdy for docs, code

@allcontributors
Copy link
Contributor

@nickmccurdy

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

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.

toHaveDisplayValue checks for substring rather than equality when passed string value?
2 participants