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 test for createAddressId() #776

Merged
merged 3 commits into from
Dec 2, 2022
Merged

Add test for createAddressId() #776

merged 3 commits into from
Dec 2, 2022

Conversation

atodorov
Copy link
Collaborator

Description of proposed changes:

Practical tips for PR review & merge:

  • All GitHub Actions report PASS
  • Newly added code/functions have unit tests
    • Coverage tools report all newly added lines as covered
    • The positive scenario is exercised
    • Negative scenarios are exercised, e.g. assert on all possible errors
    • Assert on events triggered if applicable
    • Assert on changes made to storage if applicable
  • Modified behavior/functions - try to make sure above test items are covered
  • Integration tests are added if applicable/needed

@atodorov atodorov force-pushed the adjust_collect_coins_test branch 3 times, most recently from 116ac13 to e9e0136 Compare November 18, 2022 19:59
@github-actions
Copy link

For full LLVM coverage report click here!

@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2022

Codecov Report

Merging #776 (2c95633) into dev (8c80f5b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev     #776   +/-   ##
=======================================
  Coverage   79.97%   79.97%           
=======================================
  Files          50       50           
  Lines       10056    10056           
=======================================
  Hits         8042     8042           
  Misses       2014     2014           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@atodorov
Copy link
Collaborator Author

@nathanwhit even after picking up your commit from #775 and bumping creditcoin-js version I am seeing a failure in this test:

  ● CollectCoins › persist › fee is min 0.01 CTC but bypassed by OCW

    creditcoin.NonExistentAddress: The specified address does not exist.

Will continue debugging but pointers are welcome.

@atodorov atodorov force-pushed the adjust_collect_coins_test branch 4 times, most recently from ce5b590 to 2c95633 Compare November 22, 2022 16:09
@atodorov atodorov changed the title Adjust collect coins test Add test for createAddressId() Nov 22, 2022
@atodorov
Copy link
Collaborator Author

atodorov commented Nov 22, 2022

https://github.com/gluwa/creditcoin/actions/runs/3525098639/jobs/5911383884 failed as expected:

FAIL src/test/register-address.test.ts (14.333 s)
  ● RegisterAddress › createAddressId works as expected

    expect(received).toBe(expected) // Object.is equality

    Expected: "0xda20db6898dd5de184ccfecded048ba5495f870c2a53d1bc805deaace49b0fe3"
    Received: "0x76b0320bf0f26bdfb666c3919ed9ba49b5fb2a4ac60ae5e4855a9705fb0af0b0"

Retesting with the commit from #775 -> PASS, see https://github.com/gluwa/creditcoin/actions/runs/3525500553/jobs/5912299101

@atodorov atodorov marked this pull request as ready for review November 22, 2022 17:56
@nathanwhit nathanwhit merged commit 2ffc85b into dev Dec 2, 2022
@nathanwhit nathanwhit deleted the adjust_collect_coins_test branch December 2, 2022 20:58
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.

None yet

4 participants