I have set up a local geth on ubuntu and I'm running my project on it.
While writing test cases, I saw that the test cases which were working fine in testrpc environment started facing issues when run on local geth developement environment.
I don't get any error message from my test case when revert() is caught in my solidity code.
Here the example:
myContract {
function ExpectedARevertWhenCalled(){
revert();
}
}
Now when I call this method in my test. The test cases should fail but no error is thrown.
Can someone please help understand the issue behind it?
FYI: This is how I'm calling the method in my test case:
contract('MyContract', async () => {
it("myContractFunction", async () => {
let obj= await TwoKeyReg.new();
await obj.ExpectedARevertWhenCalled();
});
});
require(false);
instead ofrevert();
– Maxpeinas Aug 23 '18 at 8:42