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

task(tests): mocking, continued #4233

Merged
merged 3 commits into from
Nov 12, 2024
Merged

task(tests): mocking, continued #4233

merged 3 commits into from
Nov 12, 2024

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Nov 7, 2024

A few new shiny things for the mocking test helpers:

  • reuse more code by introducing a generic parameter for the endpoint specific data
  • add a MockClientBuilder to help creating a Client already attached to the server, and logged in,
  • use Matrix v1.12 for all the testing endpoints, and update mock path matchers

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 6 lines in your changes missing coverage. Please review.

Project coverage is 84.89%. Comparing base (982c6ea) to head (3a9fb22).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk/src/test_utils/mocks.rs 91.66% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4233      +/-   ##
==========================================
- Coverage   84.91%   84.89%   -0.03%     
==========================================
  Files         274      274              
  Lines       29745    29761      +16     
==========================================
+ Hits        25258    25265       +7     
- Misses       4487     4496       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bnjbvr bnjbvr force-pushed the bnjbvr/mock-generics branch from 9409b94 to 2a19119 Compare November 7, 2024 16:52
@bnjbvr bnjbvr marked this pull request as ready for review November 7, 2024 16:53
@bnjbvr bnjbvr requested a review from a team as a code owner November 7, 2024 16:53
@bnjbvr bnjbvr requested review from poljar and removed request for a team November 7, 2024 16:53
Copy link
Contributor

@poljar poljar 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.

@bnjbvr bnjbvr force-pushed the bnjbvr/mock-generics branch from 2a19119 to a984602 Compare November 12, 2024 10:39
@bnjbvr bnjbvr force-pushed the bnjbvr/mock-generics branch from a984602 to e038c32 Compare November 12, 2024 10:41
@bnjbvr bnjbvr enabled auto-merge (rebase) November 12, 2024 10:41
@bnjbvr bnjbvr force-pushed the bnjbvr/mock-generics branch from e038c32 to 3a9fb22 Compare November 12, 2024 10:45
@bnjbvr bnjbvr merged commit 36b96cc into main Nov 12, 2024
40 checks passed
@bnjbvr bnjbvr deleted the bnjbvr/mock-generics branch November 12, 2024 11:01
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.

2 participants