aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/ether_token.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/test/ether_token.ts')
-rw-r--r--packages/contracts/test/ether_token.ts15
1 files changed, 7 insertions, 8 deletions
diff --git a/packages/contracts/test/ether_token.ts b/packages/contracts/test/ether_token.ts
index 4e52b658f..e2fc69aee 100644
--- a/packages/contracts/test/ether_token.ts
+++ b/packages/contracts/test/ether_token.ts
@@ -1,11 +1,12 @@
-import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
-import { BigNumber, promisify } from '@0xproject/utils';
+import { BlockchainLifecycle } from '@0xproject/dev-utils';
+import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as chai from 'chai';
import 'make-promises-safe';
-import { WETH9Contract } from '../src/contract_wrappers/generated/weth9';
+import { WETH9Contract } from '../src/generated_contract_wrappers/weth9';
import { artifacts } from '../src/utils/artifacts';
+import { expectInsufficientFundsAsync, expectRevertOrAlwaysFailingTransactionAsync } from '../src/utils/assertions';
import { chaiSetup } from '../src/utils/chai_setup';
import { constants } from '../src/utils/constants';
import { provider, txDefaults, web3Wrapper } from '../src/utils/web3_wrapper';
@@ -45,9 +46,7 @@ describe('EtherToken', () => {
const initEthBalance = await web3Wrapper.getBalanceInWeiAsync(account);
const ethToDeposit = initEthBalance.plus(1);
- return expect(etherToken.deposit.sendTransactionAsync({ value: ethToDeposit })).to.be.rejectedWith(
- "ender doesn't have enough funds to send tx.",
- );
+ return expectInsufficientFundsAsync(etherToken.deposit.sendTransactionAsync({ value: ethToDeposit }));
});
it('should convert deposited Ether to wrapped Ether tokens', async () => {
@@ -76,8 +75,8 @@ describe('EtherToken', () => {
const initEthTokenBalance = await etherToken.balanceOf.callAsync(account);
const ethTokensToWithdraw = initEthTokenBalance.plus(1);
- return expect(etherToken.withdraw.sendTransactionAsync(ethTokensToWithdraw)).to.be.rejectedWith(
- constants.REVERT,
+ return expectRevertOrAlwaysFailingTransactionAsync(
+ etherToken.withdraw.sendTransactionAsync(ethTokensToWithdraw),
);
});