Open coventry opened 4 years ago
Having difficulty diagnosing this issue, although the error message definitely appears to happen when hitting the web3.currentProvider.send
call on line 115.
Can't seem to find an older v5.0.x version of truffle that works with this test because of unpinned Web3 dependencies 😬.
Okay, so AFAICT, web3.currentProvider.send
expects a callback to be passed.
See Synthetix and JoinColony's use of web3.currentProvider
in their test helpers :
It would be pretty useful to document this. We can likely also do some things on our end to enable not having to pass a callback.
https://gitter.im/ConsenSys/truffle?at=5de5c3d91659720ca8eb0c4c
Issue
I'm seeing the failure reported here: https://ethereum.stackexchange.com/questions/15101/how-to-use-the-testrpc-evm-increasetime-parameter-from-truffle-console#comment89683_21515
Namely, if I use eth_increaseTime, then invoke a contract, I get Uncaught TypeError: callback is not a function.
There's a test case here: https://github.com/coventry/white_elephant/blob/failing-eth_increaseTime/test/white_elephant_test.js#L117
Remove line 117, and the test passes. Remove lines 115-116, and I get a proper revert from the contract. Only with the two lines together do I get the above error.
Steps to Reproduce
Clone the above
white_elephant
repo, install truffle, runtruffle test
. Fails withIt's unclear which callback this error is referring to.
Expected Behavior
Revert on the contract transaction on line 117 of
white_elephant_test.js
.Actual Results
See above.
Environment
truffle version
):node --version
): 10.17.0npm --version
): 6.10.3