Skip to content

Conversation

zguesmi
Copy link
Member

@zguesmi zguesmi commented Jan 8, 2025

No description provided.

@zguesmi zguesmi self-assigned this Jan 8, 2025
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.50%. Comparing base (cf2d0a7) to head (7d37544).
Report is 8 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #177      +/-   ##
===========================================
- Coverage    84.87%   84.50%   -0.37%     
===========================================
  Files           35       35              
  Lines         1084     1084              
  Branches       221      221              
===========================================
- Hits           920      916       -4     
- Misses         164      168       +4     

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

Copy link
Contributor

@Le-Caignec Le-Caignec left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from feature/400_contribute-and-callback-migration to develop January 10, 2025 15:14
@zguesmi zguesmi marked this pull request as ready for review January 10, 2025 16:31
Comment on lines +137 to +141
expect(deal.trust).to.equal(1);
expect(deal.category).to.equal(0);
expect(deal.tag).to.equal(HashZero); // Standard
expect(deal.requester).to.equal(requester.address);
expect(deal.beneficiary).to.equal(AddressZero);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not:

Suggested change
expect(deal.trust).to.equal(1);
expect(deal.category).to.equal(0);
expect(deal.tag).to.equal(HashZero); // Standard
expect(deal.requester).to.equal(requester.address);
expect(deal.beneficiary).to.equal(AddressZero);
expect(deal.trust).to.equal(1);
expect(deal.category).to.equal(2);
expect(deal.tag).to.equal(0x..3); // Standard
expect(deal.requester).to.equal(requester.address);
expect(deal.beneficiary).to.equal(0x..4);
[...]

?

Copy link
Member Author

Choose a reason for hiding this comment

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

My goal is to use minimal setup code and check that all fields of the deal are returned and not necessarily go into more details because we already have other tests that check all relevant fields for each type of deal.

Comment on lines +203 to +204
expect(contribution.resultHash.length).to.equal(66);
expect(contribution.resultSeal.length).to.equal(66);
Copy link
Contributor

Choose a reason for hiding this comment

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

To understand, why checking length instead of content?

Copy link
Member Author

@zguesmi zguesmi Jan 13, 2025

Choose a reason for hiding this comment

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

I wanted to the reduce noise in the test and not having to worry about the hashes. I assert that a hash is returned without necessarily checking its content as other tests (contribution tests) are already doing that.

Copy link
Contributor

@james-toussaint james-toussaint left a comment

Choose a reason for hiding this comment

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

Thank you :)

@zguesmi zguesmi merged commit 0d55ac8 into develop Jan 13, 2025
4 of 5 checks passed
@zguesmi zguesmi deleted the feature/400_contribute-and-callback-cleaning branch January 13, 2025 14:40
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.

4 participants