Closed chebykin closed 3 years ago
Hi @chebykin! I’m sorry that you had this issue.
We have been able to reproduce this issue by following these steps: Using the setup, contract and tests from: https://docs.openzeppelin.com/learn/writing-automated-tests#performing-complex-assertions
npm install --save-dev hardhat
npx hardhat
npm install --save-dev @nomiclabs/hardhat-truffle5 @nomiclabs/hardhat-web3 web3
npm install --save-dev @openzeppelin/test-helpers
$ npx hardhat test
Contract: Box
✓ retrieve returns a value previously stored
✓ store emits an event
@openzeppelin/test-helpers WARN expectRevert: Assertions may yield false negatives!
Revert reason checks are only known to work on Ganache >=2.2.0 and Hardhat, and the current node is HardhatNetwork/2.2.1/@ethereumjs/vm/5.3.2.
If your node does support revert reasons, please let us know: https://github.com/OpenZeppelin/openzeppelin-test-helpers/issues/new
✓ non owner cannot store a value
3 passing (599ms)
Thanks so much for reporting it! The project owner will review and triage this issue as soon as they can.
The regex will need to be updated to support @ethereumjs
https://github.com/OpenZeppelin/openzeppelin-test-helpers/blob/763b5d139b023cbc74a467b630ec3f31772a76ad/src/expectRevert.js#L36
Can someone please submit the updated regex? I'm not sure what it should look like.
Hi @frangio,
The following regex checks for either ethereumjs-vm
or @ethereumjs/vm
const hardhatVersion = /HardhatNetwork\/([\w.-]+)\/(ethereumjs-vm|@ethereumjs\/vm)/.exec(nodeInfo);
Fixed in the latest release.
The regex doesn't match the current
@ethereumjs/vm
npm name