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

Changed before for beforeAll, refactored Bouncer tests. #1094

Merged
merged 4 commits into from
Jul 20, 2018

Conversation

nventuro
Copy link
Contributor

@nventuro nventuro commented Jul 19, 2018

Fixes #1021.

Some before functions remain so that time can be measured properly:

before(async function () {
  // Advance to the next block to correctly read time in the solidity "now" function interpreted by ganache
  await advanceBlock();
});

Ideally the helpers would take care of this automatically, but I'm not sure how we'd go about implementing it.

I also refactored the Bouncer tests, since they relied heavily on the before block and reused contract state, and improved readability and coverage in the process.

@nventuro nventuro requested review from frangio and shrugs July 19, 2018 19:04
@frangio
Copy link
Contributor

frangio commented Jul 19, 2018

Unfortunately the SignatureBouncer tests had been changed quite a lot in #1024. Can you cherry pick the relevant commits here since that PR is on hold for now?

@nventuro
Copy link
Contributor Author

Done! I brought in the helpers/sign.js changes from b85d8d6.

@shrugs
Copy link
Contributor

shrugs commented Jul 19, 2018

hopefully the merge works well, but should be fine after a rebase. LGMT 👍

@nventuro nventuro merged commit 67b67b7 into OpenZeppelin:master Jul 20, 2018
@nventuro nventuro deleted the test-before-each branch July 20, 2018 15:25
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.

3 participants