-
Notifications
You must be signed in to change notification settings - Fork 193
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
test: hash consensus: add more frames tests #576
test: hash consensus: add more frames tests #576
Conversation
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.
Thank you for the contribution 🚀
contracts/0.8.9/test_helpers/oracle/HashConsensusTimeTravellable.sol
Outdated
Show resolved
Hide resolved
@@ -161,7 +236,7 @@ contract('HashConsensus', ([admin, member1, member2]) => { | |||
}) | |||
|
|||
it(`decreasing the frame size cannot decrease the current reference slot`, async () => { | |||
assert.equal(+await consensus.getTime(), computeTimestampAtEpoch(1)) | |||
assert.equal(+(await consensus.getTime()), computeTimestampAtEpoch(1)) |
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.
could we change prettier settings to not add parentheses around await in cases like this one? it's much less readable this way imo
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.
not critical, a nitpick
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.
Faced same issues with prettier in different PR. My prettier is pulling config from root of the repo but a lot of other files are not formatted at all. In a different PR, we can update config and format all(or just currently relevant) files.
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.
let's do it later in a single batch I suggest
…o-dao into feature/shapella-upgrade-tests-tests-frames
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.
Magnificient, thanks 👍
it('should revert without manage members and qourum role', async () => { | ||
await assert.reverts(consensus.addMember(member1, 2, { from: account1 }), errorMessage) | ||
it('should revert without MANAGE_MEMBERS_AND_QUORUM_ROLE role', async () => { | ||
await assert.revertsOZAccessControl( |
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.
👍
Tests HashConsensus:
fastLaneLengthSlots
togetFrameConfig
method in hashConsensus contractHashConsensusTimeTravellable
INITIAL_EPOCH
const todeployHashConsensus