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

Add unit tests for the timeline #1192

Merged
merged 4 commits into from
Nov 10, 2022
Merged

Add unit tests for the timeline #1192

merged 4 commits into from
Nov 10, 2022

Conversation

jplatte
Copy link
Collaborator

@jplatte jplatte commented Nov 8, 2022

So far we've only had integration tests that use a mocked Matrix server. These unit tests don't need that and are thus much easier to write. Of course we should still have some integration tests covering server interaction and the public API, but I think this is the much more realistic way of getting good coverage of all the edge cases of the timeline implementation.

Part of #1103

@codecov
Copy link

codecov bot commented Nov 8, 2022

Codecov Report

Base: 73.58% // Head: 73.69% // Increases project coverage by +0.10% 🎉

Coverage data is based on head (c8bb077) compared to base (93be96c).
Patch coverage: 83.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1192      +/-   ##
==========================================
+ Coverage   73.58%   73.69%   +0.10%     
==========================================
  Files         110      110              
  Lines       12605    12611       +6     
==========================================
+ Hits         9276     9294      +18     
+ Misses       3329     3317      -12     
Impacted Files Coverage Δ
crates/matrix-sdk/src/room/timeline/mod.rs 82.71% <ø> (ø)
crates/matrix-sdk/src/room/timeline/event_item.rs 72.36% <83.33%> (+6.65%) ⬆️
...ates/matrix-sdk/src/room/timeline/event_handler.rs 72.68% <0.00%> (+3.96%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jplatte

This comment was marked as resolved.

@jplatte

This comment was marked as resolved.

@jplatte jplatte force-pushed the jplatte/timeline-testing branch 3 times, most recently from ae32a6e to f5b3165 Compare November 8, 2022 18:26
@jplatte jplatte changed the title WIP: Timeline unit testing Add unit tests for the timeline Nov 9, 2022
@jplatte jplatte requested a review from a team November 9, 2022 08:45
@jplatte jplatte merged commit 45cf32d into main Nov 10, 2022
@jplatte jplatte deleted the jplatte/timeline-testing branch November 10, 2022 12:43
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