-
Notifications
You must be signed in to change notification settings - Fork 49
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
Core: GovernQueue test #111
Conversation
|
Note: I think we should/could move the |
Note: The complexity of the |
I don't disagree, but also I wasn't optimizing for great OOD, nor I think we should. Having a concise smart contract that can be read in one go without having to jump between multiple contracts is more important for me than easier testability. If a dev needs to change something, they only need to touch in one file without thinking about dependencies. |
Yes, I wouldn't do that just for better tests. But I thought there are probably also some other advantages.. 🤷♂️ |
Note: Tests can't have all the assertions they should have because of this bug TrueFiEng/Waffle#245 |
@@ -0,0 +1,179 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use token contract from govern-token
and add this package as devDependency
@@ -0,0 +1,86 @@ | |||
import { keccak256, defaultAbiCoder, solidityPack } from 'ethers/lib/utils' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move those test-helpers to the govern-contract-utils
package instead of duplicating it. (Don't forget to update the test in the erc3k
package)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and add a unit-test test for those test-helpers cause of the complexity and importance they have.
Does not collect the tokens as expected. It should instead of collecting and sending the token to the |
Note: https://github.com/aragon/govern/blob/master/packages/erc3k/contracts/ERC3000Data.sol#L53
|
…ions added to test, and helpers.getEncodedContract function template created
…an't handle structs nicely, GovernQueue.challenge lucky path case added
We should finish this ASAP @nivida |
Codecov Report
@@ Coverage Diff @@
## master #111 +/- ##
===========================================
+ Coverage 56.92% 72.59% +15.67%
===========================================
Files 32 35 +3
Lines 527 624 +97
Branches 62 70 +8
===========================================
+ Hits 300 453 +153
+ Misses 227 171 -56
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the finish @novaknole
closes #15