Replaced assertJump, assertRevert and expectThrow with shouldFail. (#1363)
* Replaced assertJump, assertRevert and expectThrow with shouldFail. * Fixed linter errors. * Fixed typo. * Made the helpers async.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
const { shouldBehaveLikeEscrow } = require('./Escrow.behavior');
|
||||
const { expectThrow } = require('../helpers/expectThrow');
|
||||
const { EVMRevert } = require('../helpers/EVMRevert');
|
||||
|
||||
const shouldFail = require('../helpers/shouldFail');
|
||||
const { ether } = require('../helpers/ether');
|
||||
|
||||
const BigNumber = web3.BigNumber;
|
||||
@ -34,7 +34,7 @@ contract('ConditionalEscrow', function ([_, owner, payee, ...otherAccounts]) {
|
||||
it('reverts on withdrawals', async function () {
|
||||
await this.escrow.deposit(payee, { from: owner, value: amount });
|
||||
|
||||
await expectThrow(this.escrow.withdraw(payee, { from: owner }), EVMRevert);
|
||||
await shouldFail.reverting(this.escrow.withdraw(payee, { from: owner }));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user