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

chore: improve mocks lib #30

Merged
merged 6 commits into from
Aug 1, 2022
Merged

chore: improve mocks lib #30

merged 6 commits into from
Aug 1, 2022

Conversation

dadamu
Copy link
Contributor

@dadamu dadamu commented Aug 1, 2022

This PR merges test_utils and mocks into a folder, then renaming to mack_apps and mock_queriers.
Besides, it also improves x/posts and x/reports to have MockQueries struct collecting all mock functions as other modules.

@codecov
Copy link

codecov bot commented Aug 1, 2022

Codecov Report

Merging #30 (ae0dbda) into main (168ddc3) will increase coverage by 0.11%.
The diff coverage is 99.29%.

@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
+ Coverage   90.94%   91.06%   +0.11%     
==========================================
  Files          27       27              
  Lines        2276     2282       +6     
==========================================
+ Hits         2070     2078       +8     
+ Misses        206      204       -2     
Impacted Files Coverage Δ
packages/bindings-test/src/chain_communication.rs 0.00% <ø> (ø)
packages/bindings/src/profiles/querier.rs 92.33% <ø> (ø)
packages/bindings/src/reactions/querier.rs 65.71% <ø> (ø)
packages/bindings/src/relationships/querier.rs 89.36% <ø> (ø)
packages/bindings/src/subspaces/mocks.rs 100.00% <ø> (ø)
packages/bindings/src/subspaces/querier.rs 91.70% <ø> (ø)
packages/bindings/src/posts/mocks.rs 99.00% <98.79%> (ø)
packages/bindings/src/mocks/mock_queriers.rs 98.14% <100.00%> (ø)
packages/bindings/src/posts/querier.rs 90.86% <100.00%> (+0.09%) ⬆️
packages/bindings/src/reports/mocks.rs 100.00% <100.00%> (ø)
... and 4 more

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 2904dff...ae0dbda. Read the comment docs.

Copy link
Contributor

@leobragaz leobragaz left a comment

Choose a reason for hiding this comment

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

Nice improvements 👍

Copy link

@manu0466 manu0466 left a comment

Choose a reason for hiding this comment

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

Looks goot me! Nice work 🚀
What do you think of removing the mocks feature and build the mocks just when the target is not wasm32?
I see at the moment that the mocks module is compiled only when the mocks feature is enabled and not compiling for wasm32 I think we can safely remove the mocks feature.

@dadamu
Copy link
Contributor Author

dadamu commented Aug 1, 2022

@manu0466 Great thought, that makes more sense.

Copy link

@manu0466 manu0466 left a comment

Choose a reason for hiding this comment

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

Nice work!

@manu0466 manu0466 merged commit 95d0f41 into main Aug 1, 2022
@manu0466 manu0466 deleted the paul/improve-mocks-lib branch August 1, 2022 11:21
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.

3 participants