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

Test/update options #162

Merged
merged 21 commits into from
Jan 25, 2022
Merged

Test/update options #162

merged 21 commits into from
Jan 25, 2022

Conversation

ssp6
Copy link
Contributor

@ssp6 ssp6 commented Jan 19, 2022

This is the canary tests for update options using:

  • useTokenBalance
  • useContractReader

As dictated in EPIC #118

To get those created also had to create tests for useContractReader (#122 ) and more work on useTokenBalance (#76 )

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
Include canary tests that will actually test the update options. All other tests we will just mock instead
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Member

@ShravanSunder ShravanSunder left a comment

Choose a reason for hiding this comment

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

🔥 great work! and happy about comments 🥳
just left one feedback about helper.

this test seems to be failing as well

useContractReader Given that a YourContract is deployed Given the setPurpose is called and set with a new value When given opti… given options of block number interval to update; then the hook does not update until that amount of blocks has passed) failed`

testresult.xml

AssertionError: expected 'your purpose' to equal 'no purpose'
at Context. (/home/runner/work/eth-hooks/eth-hooks/test/useContractReader.test.ts:183:48)

src/functions/hookHelpers.ts Outdated Show resolved Hide resolved
src/hooks/erc/useTokenBalance.ts Show resolved Hide resolved
test/useContractReader.test.ts Outdated Show resolved Hide resolved
test/useContractReader.test.ts Outdated Show resolved Hide resolved
test/useContractReader.test.ts Outdated Show resolved Hide resolved
test/useContractReader.test.ts Outdated Show resolved Hide resolved
@github-actions

This comment has been minimized.

@github-actions
Copy link

Unit Test Results

  1 files  ±  0  28 suites  +4   1m 27s ⏱️ +34s
39 tests +12  39 ✔️ +12  0 💤 ±0  0 ±0 

Results for commit 2093faf. ± Comparison against base commit 5b21c6d.

Copy link
Member

@ShravanSunder ShravanSunder left a comment

Choose a reason for hiding this comment

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

🔥

@ShravanSunder ShravanSunder merged commit fb290e2 into next Jan 25, 2022
@ShravanSunder ShravanSunder deleted the Test/UpdateOptions branch January 25, 2022 16:36
ShravanSunder pushed a commit to ShravanSunder/eth-hooks that referenced this pull request Sep 8, 2023
Use the correct prop as a key in Ramp.jsx
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants