Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Add test for new useContractReader #122

Closed
Tracked by #118
ShravanSunder opened this issue Jan 10, 2022 · 1 comment
Closed
Tracked by #118

Add test for new useContractReader #122

ShravanSunder opened this issue Jan 10, 2022 · 1 comment
Labels
🧪 type.testing automated testing

Comments

@ShravanSunder
Copy link
Member

ShravanSunder commented Jan 10, 2022

Use Hook test strategy mentioned in: #118 (comment)

Additional tests (other than specified in strategy)

Test with using an event with an update option.

  • hook should update when event is fired
  • It should disable other update options.

Test other update options without mocking

@ShravanSunder ShravanSunder added the 🧪 type.testing automated testing label Jan 10, 2022
ShravanSunder added a commit that referenced this issue Jan 21, 2022
ShravanSunder added a commit that referenced this issue Jan 21, 2022
ShravanSunder added a commit that referenced this issue Jan 22, 2022
ShravanSunder added a commit that referenced this issue Jan 23, 2022
ssp6 added a commit that referenced this issue Jan 25, 2022
ShravanSunder added a commit that referenced this issue Jan 25, 2022
* #76 update useTokenBalance for blockNumberInterval option

Ensures the blockNumberInterval option for hooks actually only updates after correct amount of blocks. For other hooks mocking will be used instead of being this verbose, to speed up test time

* #76 Finish tests for useTokenBalance

Include canary tests that will actually test the update options. All other tests we will just mock instead

* #76 Update useTokenBalance test to be a bit neater

* #122 Add tests for useContractReader with updateOptions

* add helper function that improves readability of failing tests

* move shouldFailWithMessage test helper to appropriate location

* add notes for shravan for failing test
useContractReader - When given options of block number interval to update

* #122 updates to helpers and changed the logic by check blockchain for purpose first

* #122 fixed final check

* #122 fixed final check

* #122 pushed an update for interval test

* #122 made a test case more cohesive

* #122 updated comments

* #122 updated comments

* #122 fix check by turning off automine

* #122 minor cleanup and refactoring

* updated actions

* updated actions

Co-authored-by: Shravan Sunder <[email protected]>
@ssp6
Copy link
Contributor

ssp6 commented Feb 16, 2022

Closed in PR 162

@ssp6 ssp6 closed this as completed Feb 16, 2022
ShravanSunder pushed a commit to ShravanSunder/eth-hooks that referenced this issue Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧪 type.testing automated testing
Projects
Status: Done
Development

No branches or pull requests

2 participants