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

feat: implement toBeSelected matcher #1488

Merged
merged 4 commits into from Sep 8, 2023

Conversation

AntoineThibi
Copy link
Contributor

@AntoineThibi AntoineThibi commented Sep 6, 2023

Summary

Implement toBeSelected : check that the accessibilityState props is "selected".

Test plan

  • toBeSelected works, .not.toBeSelected works
  • Display the propers error message if the test fail

@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01% 🎉

Comparison is base (8373d6a) 97.89% compared to head (324fb1e) 97.91%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1488      +/-   ##
==========================================
+ Coverage   97.89%   97.91%   +0.01%     
==========================================
  Files          84       85       +1     
  Lines        5087     5120      +33     
  Branches      786      792       +6     
==========================================
+ Hits         4980     5013      +33     
  Misses        107      107              
Files Changed Coverage Δ
src/helpers/accessiblity.ts 100.00% <100.00%> (ø)
src/matchers/extend-expect.ts 100.00% <100.00%> (ø)
src/matchers/to-be-selected.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.

📢 Have feedback on the report? Share it here.

@AntoineThibi AntoineThibi changed the title feat: implement toBeSelected feat: implement toBeSelected matcher Sep 6, 2023
@MattAgn
Copy link
Collaborator

MattAgn commented Sep 8, 2023

Sounds great to me! 🚀 Thanks for the contribution 🙏🤩
Small tip for your PR description:

  • in the summary, you could say what toBeSelected checks
  • in the tests, you can say globally what main test cases you cover in your unit tests

Copy link
Member

@mdjastrzebski mdjastrzebski 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! Let's merge it 🛳️

@mdjastrzebski mdjastrzebski merged commit 1592d35 into callstack:main Sep 8, 2023
9 checks passed
@mdjastrzebski
Copy link
Member

🎉 Release in version: v12.4.0

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

Successfully merging this pull request may close these issues.

None yet

4 participants