I am using openzeppelin-test-helpers to test my project, expectEvent etc is working as I expected but when I call expectRevert, this error is being raised:
1) Contract: Flipa Bets
Player can NOT attend to high side if the bet amount is too low.:
Error: CONNECTION ERROR: Couldn't connect to node http://localhost:8545.
at Object.ConnectionError (node_modules/web3-core-helpers/lib/errors.js:66:23)
at Object.InvalidConnection (node_modules/web3-core-helpers/lib/errors.js:36:21)
at HttpProvider.failed (node_modules/web3-providers-http/lib/index.js:139:25)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
The way I call expectRevert is this:
It('Player can NOT attend to the high side if the bet amount is too low.', async () => {
receipt = flipa.attend(HIGH, {
from: player1, value: minBetAmount.sub(new BN('100'))
});
await expectRevert(receipt, 'Bet amount is too low');
});
I am using openzeppelin-test-helpers to test my project, expectEvent etc is working as I expected but when I call expectRevert, this error is being raised:
The way I call expectRevert is this:
The versions that I am using:
Are there anyone that can help me about this?