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

assertRevert: Fix late return bug #1123

Merged
merged 1 commit into from
Jul 27, 2018

Conversation

justuswilhelm
Copy link
Contributor

Fixes #775

πŸš€ Description

We now ensure that if an exception is thrown while awaiting the promise,
the exception has to be a revert. We throw 'Expected revert not
received' only afterwards. This solves any problems with confusing the
word 'revert'.

  • πŸ“˜ I've reviewed the OpenZeppelin Contributor Guidelines
  • βœ… I've added tests where applicable to test my new functionality.
  • πŸ“– I've made sure that my contracts are well-documented.
  • 🎨 I've run the JS/Solidity linters and fixed any issues (npm run lint:all:fix).

We now ensure that if an exception is thrown while awaiting the promise,
the exception _has_ to be a revert. We throw 'Expected revert not
received' only afterwards. This solves any problems with confusing the
word 'revert'.

Fix OpenZeppelin#775
@nventuro
Copy link
Contributor

Great @justuswilhelm, thanks! I can't wait to get to #1078 so that we can properly test this stuff and prevent it in the future.

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.

assertRevert.js passes when no revert occurred
2 participants