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

test(snapshot): Use snapshot testing in sdk-common #4428

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

BillCarsonFr
Copy link
Member

Tentative to introduce snapshot testing using insta.rs.
Added some initial doc on the Contributing.md file

As a draft now, because I have some open questions on how to do things.

I need also to see what to do for CI

Insta behaves differently in CI environments. For instance it will not write new snapshot files. This behavior is enabled by the CI environment variable. Please ensure that your CI system sets it.

export CI=true

  • Public API changes documented in changelogs (optional)

Signed-off-by:

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.

Nice.

Cargo.toml Show resolved Hide resolved
crates/matrix-sdk-common/Cargo.toml Outdated Show resolved Hide resolved
crates/matrix-sdk-common/src/deserialized_responses.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-common/src/deserialized_responses.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-common/src/deserialized_responses.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.43%. Comparing base (f2942db) to head (3b31bbe).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4428      +/-   ##
==========================================
+ Coverage   85.41%   85.43%   +0.01%     
==========================================
  Files         283      283              
  Lines       31559    31559              
==========================================
+ Hits        26955    26961       +6     
+ Misses       4604     4598       -6     

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

@BillCarsonFr BillCarsonFr marked this pull request as ready for review December 19, 2024 09:37
@BillCarsonFr BillCarsonFr requested a review from a team as a code owner December 19, 2024 09:37
@BillCarsonFr BillCarsonFr requested review from Hywan and poljar and removed request for a team December 19, 2024 09:37
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. Thanks for adding this.

@BillCarsonFr BillCarsonFr force-pushed the valere/insta_rs_snapshot_testing branch from d907b0f to 3b31bbe Compare December 19, 2024 17:12
@BillCarsonFr BillCarsonFr merged commit 519f281 into main Dec 19, 2024
41 checks passed
@BillCarsonFr BillCarsonFr deleted the valere/insta_rs_snapshot_testing branch December 19, 2024 17:30
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