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

unify ethereum revert/throw/etc error expectations #942

Closed
1 task done
shrugs opened this issue May 10, 2018 · 3 comments · Fixed by #1363
Closed
1 task done

unify ethereum revert/throw/etc error expectations #942

shrugs opened this issue May 10, 2018 · 3 comments · Fixed by #1363
Assignees
Labels
good first issue Low hanging fruit for new contributors to get involved! tests Test suite and helpers.
Milestone

Comments

@shrugs
Copy link
Contributor

shrugs commented May 10, 2018

🎉 Description

We have a bunch of different error handlers for solidity-specific things. They should just be one assertion function that accepts a configuration options hash if and only if the caller needs to be more specific than just "it fails".

Maybe something like:

await expectFailure(
   myPromise,
   { onlyRevert: true }
)

We need to

  • write this assertion

  • update literally everywhere in the codebase that uses the other styles

  • 📈 This is a feature request.

@frangio
Copy link
Contributor

frangio commented May 10, 2018

Bonus points for making it compatible with "should"-style assertions.

@frangio
Copy link
Contributor

frangio commented May 10, 2018

See #938, #917 for recent issues to keep in mind.

@frangio frangio added this to the v1.12.0 milestone Jul 6, 2018
@SylTi
Copy link
Contributor

SylTi commented Jul 10, 2018

Also the current assertRevert doesn't work when the revert happens during the contract deployment.
Example: await assertRevert(Contract.new(args));

@frangio frangio added tests Test suite and helpers. feature New contracts, functions, or helpers. kind:improvement and removed feature New contracts, functions, or helpers. labels Jul 20, 2018
@nventuro nventuro added the good first issue Low hanging fruit for new contributors to get involved! label Jul 25, 2018
@shrugs shrugs modified the milestones: v1.12.0, v2.0 Aug 2, 2018
@nventuro nventuro modified the milestones: v2.0, v2.1 Aug 13, 2018
@come-maiz come-maiz modified the milestones: v2.1, v2.0 Oct 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Low hanging fruit for new contributors to get involved! tests Test suite and helpers.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants