diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-03 00:24:24 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-06-03 00:24:24 +0800 |
commit | cc6b27cbb179de3e5ac124bfddac63f66e16737a (patch) | |
tree | e1a1d16d44d3c40ca06c7a4bfab80a03b02bfb0d /test | |
parent | 7cf60b589b280c578bcde4b9209e70d07c92c241 (diff) | |
download | dexon-0x-contracts-cc6b27cbb179de3e5ac124bfddac63f66e16737a.tar.gz dexon-0x-contracts-cc6b27cbb179de3e5ac124bfddac63f66e16737a.tar.zst dexon-0x-contracts-cc6b27cbb179de3e5ac124bfddac63f66e16737a.zip |
Address feedback
Diffstat (limited to 'test')
-rw-r--r-- | test/exchange_wrapper_test.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index 842d6de32..0fa2f93e0 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -162,7 +162,7 @@ describe('ExchangeWrapper', () => { }); describe('should throw when not enough balance or allowance to fulfill the order', () => { const fillableAmount = new BigNumber(5); - const lackingBalance = new BigNumber(3); + const balanceToSubtractFromMaker = new BigNumber(3); const lackingAllowance = new BigNumber(3); let signedOrder: SignedOrder; beforeEach('create fillable signed order', async () => { @@ -171,7 +171,7 @@ describe('ExchangeWrapper', () => { ); }); it('should throw when taker balance is less than fill amount', async () => { - await zeroEx.token.transferAsync(takerTokenAddress, takerAddress, coinbase, lackingBalance); + await zeroEx.token.transferAsync(takerTokenAddress, takerAddress, coinbase, balanceToSubtractFromMaker); zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, @@ -187,7 +187,7 @@ describe('ExchangeWrapper', () => { )).to.be.rejectedWith(ExchangeContractErrs.INSUFFICIENT_TAKER_ALLOWANCE); }); it('should throw when maker balance is less than maker fill amount', async () => { - await zeroEx.token.transferAsync(makerTokenAddress, makerAddress, coinbase, lackingBalance); + await zeroEx.token.transferAsync(makerTokenAddress, makerAddress, coinbase, balanceToSubtractFromMaker); zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, @@ -229,8 +229,8 @@ describe('ExchangeWrapper', () => { zeroEx.setTransactionSenderAccount(takerAddress); }); it('should throw when maker doesn\'t have enough balance to pay fees', async () => { - const lackingBalance = new BigNumber(1); - await zeroEx.token.transferAsync(zrxTokenAddress, makerAddress, coinbase, lackingBalance); + const balanceToSubtractFromMaker = new BigNumber(1); + await zeroEx.token.transferAsync(zrxTokenAddress, makerAddress, coinbase, balanceToSubtractFromMaker); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, )).to.be.rejectedWith(ExchangeContractErrs.INSUFFICIENT_MAKER_FEE_BALANCE); @@ -244,8 +244,8 @@ describe('ExchangeWrapper', () => { )).to.be.rejectedWith(ExchangeContractErrs.INSUFFICIENT_MAKER_FEE_ALLOWANCE); }); it('should throw when taker doesn\'t have enough balance to pay fees', async () => { - const lackingBalance = new BigNumber(1); - await zeroEx.token.transferAsync(zrxTokenAddress, takerAddress, coinbase, lackingBalance); + const balanceToSubtractFromTaker = new BigNumber(1); + await zeroEx.token.transferAsync(zrxTokenAddress, takerAddress, coinbase, balanceToSubtractFromTaker); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, )).to.be.rejectedWith(ExchangeContractErrs.INSUFFICIENT_TAKER_FEE_BALANCE); @@ -261,7 +261,7 @@ describe('ExchangeWrapper', () => { }); }); describe('successful fills', () => { - it('should fill the valid order', async () => { + it('should fill a valid order', async () => { const fillableAmount = new BigNumber(5); const signedOrder = await fillScenarios.createFillableSignedOrderAsync( makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount, |