Navigation Menu

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

Enhancing the toHaveProperty matcher to support array selection #12092

Merged
merged 8 commits into from Nov 29, 2021

Conversation

iifawzi
Copy link
Contributor

@iifawzi iifawzi commented Nov 27, 2021

Summary

Hi, this PR is adding the feature requested at #7284 as mentioned #7284 (comment) to support array selection while using the toHaveProperty matcher.

Test plan

All previous matchers tests are working as expected, and I've also added more test cases to test the functionality, let me know if I need to add more tests.

@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2021

Codecov Report

Merging #12092 (794c62d) into main (2a5e515) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #12092      +/-   ##
==========================================
+ Coverage   68.89%   68.90%   +0.01%     
==========================================
  Files         324      324              
  Lines       16668    16677       +9     
  Branches     4813     4814       +1     
==========================================
+ Hits        11483    11492       +9     
  Misses       5152     5152              
  Partials       33       33              
Impacted Files Coverage Δ
packages/expect/src/matchers.ts 97.86% <100.00%> (ø)
packages/expect/src/utils.ts 96.03% <100.00%> (+0.18%) ⬆️

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 2a5e515...794c62d. Read the comment docs.

@iifawzi iifawzi force-pushed the toHaveProperty-array-selection branch from e3515c3 to 794c62d Compare November 28, 2021 11:35
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

thanks!

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants