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

fails to test with the revert reason string with the Ganache GUI v2.0.1 #45

Closed
changhwan0813 opened this issue May 21, 2019 · 2 comments · Fixed by #46
Closed

fails to test with the revert reason string with the Ganache GUI v2.0.1 #45

changhwan0813 opened this issue May 21, 2019 · 2 comments · Fixed by #46

Comments

@changhwan0813
Copy link
Contributor

with the Ganache GUI v2.0.1 - which is the latest stable release - shouldFail.reverting.withMessage in v0.3.2 or expectRevert in master both fails to test the reason string.

Because a regex to test a nodeInfo cannot match a pre-release or a meta-data specified in a semver documentation - https://semver.org/#spec-item-9 and Ganache GUI v2.0.1 uses ganache-core v2.5.5-beta.0 - nodeInfo is EthereumJS TestRPC/v2.5.5-beta.0/ethereum-js

const matches = /TestRPC\/v([0-9.]+)\/ethereum-js/.exec(nodeInfo);

const matches = /TestRPC\/v([0-9.]+)\/ethereum-js/.exec(nodeInfo);

expectRevert output:

openzeppelin-test-helpers WARN       expectRevert: revert reason checking only supported on Ganache v2.2.0 or newer.
@frangio
Copy link
Contributor

frangio commented May 22, 2019

Thanks for reporting @bebeerd! There's a fix for this in #46. Would you mind testing it?

@changhwan0813
Copy link
Contributor Author

@frangio It's working now 👍

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 a pull request may close this issue.

2 participants