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

Update tests for Crypto contract to the latest testing framework API #2856

Merged
merged 2 commits into from
Nov 7, 2023

Conversation

m-Peter
Copy link
Contributor

@m-Peter m-Peter commented Oct 6, 2023

Work towards: onflow/developer-grants#216

Description

Utilizes the latest API additions from the Cadence testing API, to provide a working example of unit testing.

Note: This was tested locally with a custom flow-cli build.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (323b887) 79.43% compared to head (8037ea1) 79.43%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2856   +/-   ##
=======================================
  Coverage   79.43%   79.43%           
=======================================
  Files         332      332           
  Lines       79111    79111           
=======================================
  Hits        62842    62842           
  Misses      13958    13958           
  Partials     2311     2311           
Flag Coverage Δ
unittests 79.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@SupunS SupunS left a comment

Choose a reason for hiding this comment

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

👏 👏

@SupunS SupunS self-assigned this Oct 17, 2023
@m-Peter m-Peter force-pushed the update-crypto-contract-tests branch from d3a24e1 to 8037ea1 Compare October 31, 2023 09:20
@m-Peter m-Peter marked this pull request as ready for review October 31, 2023 09:20
@m-Peter
Copy link
Contributor Author

m-Peter commented Oct 31, 2023

I have updated the CI workflow to also run the Cadence test file for the Crypto contract. cc @turbolent

@m-Peter m-Peter requested a review from SupunS October 31, 2023 09:37
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Awesome, great work! 👏

It's so nice how the test functions can now directly test the code and the testing code does not have to be in separate scripts 👌

@SupunS SupunS merged commit bc259b2 into onflow:master Nov 7, 2023
13 of 14 checks passed
@m-Peter m-Peter deleted the update-crypto-contract-tests branch November 7, 2023 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants