From e5cc0e0562eccf67eff9cf0521c4884ffc3b0f3b Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 2 Jun 2017 17:38:47 +0200 Subject: Rename NOT_A_TAKER to TRANSACTION_SENDER_IS_NOT_FILL_ORDER_TAKER --- test/exchange_wrapper_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/exchange_wrapper_test.ts') diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index 76601d1b3..d8934d409 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -147,7 +147,7 @@ describe('ExchangeWrapper', () => { ); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.NOT_A_TAKER); + )).to.be.rejectedWith(FillOrderValidationErrs.TRANSACTION_SENDER_IS_NOT_FILL_ORDER_TAKER); }); it('should throw when order is expired', async () => { const expirationInPast = new BigNumber(42); -- cgit From 7fd84e29ab8c27cb872cf8cd0f631d4b78abba0e Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 2 Jun 2017 17:40:06 +0200 Subject: Rename EXPIRED to FILL_ORDER_EXPIRED --- test/exchange_wrapper_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/exchange_wrapper_test.ts') diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index d8934d409..e83134909 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -158,7 +158,7 @@ describe('ExchangeWrapper', () => { zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.EXPIRED); + )).to.be.rejectedWith(FillOrderValidationErrs.FILL_ORDER_EXPIRED); }); describe('should throw when not enough balance or allowance to fulfill the order', () => { const fillableAmount = new BigNumber(5); -- cgit From abf2cf4c5e2ea6d09d862871adfa16ca108907e2 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 2 Jun 2017 18:00:37 +0200 Subject: Move FillOrderValidatinErrs to ExchangeContractErrs --- test/exchange_wrapper_test.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'test/exchange_wrapper_test.ts') diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index e83134909..c05c5c26f 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -9,7 +9,7 @@ import promisify = require('es6-promisify'); import {web3Factory} from './utils/web3_factory'; import {ZeroEx} from '../src/0x.js'; import {BlockchainLifecycle} from './utils/blockchain_lifecycle'; -import {FillOrderValidationErrs, SignedOrder, Token} from '../src/types'; +import {ExchangeContractErrs, SignedOrder, Token} from '../src/types'; import {FillScenarios} from './utils/fill_scenarios'; import {TokenUtils} from './utils/token_utils'; @@ -138,7 +138,7 @@ describe('ExchangeWrapper', () => { zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, zeroFillAmount, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.FILL_AMOUNT_IS_ZERO); + )).to.be.rejectedWith(ExchangeContractErrs.ORDER_REMAINING_FILL_AMOUNT_ZERO); }); it('should throw when sender is not a taker', async () => { const fillableAmount = new BigNumber(5); @@ -147,7 +147,7 @@ describe('ExchangeWrapper', () => { ); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.TRANSACTION_SENDER_IS_NOT_FILL_ORDER_TAKER); + )).to.be.rejectedWith(ExchangeContractErrs.TRANSACTION_SENDER_IS_NOT_FILL_ORDER_TAKER); }); it('should throw when order is expired', async () => { const expirationInPast = new BigNumber(42); @@ -158,7 +158,7 @@ describe('ExchangeWrapper', () => { zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.FILL_ORDER_EXPIRED); + )).to.be.rejectedWith(ExchangeContractErrs.ORDER_FILL_EXPIRED); }); describe('should throw when not enough balance or allowance to fulfill the order', () => { const fillableAmount = new BigNumber(5); @@ -176,7 +176,7 @@ describe('ExchangeWrapper', () => { zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.NOT_ENOUGH_TAKER_BALANCE); + )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_TAKER_BALANCE); }); it('should throw when taker allowance is less than fill amount', async () => { const newAllowanceWhichIsLessThanFillAmount = fillTakerAmount.minus(lackingAllowance); @@ -185,14 +185,14 @@ describe('ExchangeWrapper', () => { zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.NOT_ENOUGH_TAKER_ALLOWANCE); + )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_TAKER_ALLOWANCE); }); it('should throw when maker balance is less than maker fill amount', async () => { await zeroEx.token.transferAsync(makerTokenAddress, makerAddress, coinbase, lackingBalance); zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.NOT_ENOUGH_MAKER_BALANCE); + )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_MAKER_BALANCE); }); it('should throw when maker allowance is less than maker fill amount', async () => { const newAllowanceWhichIsLessThanFillAmount = fillTakerAmount.minus(lackingAllowance); @@ -201,7 +201,7 @@ describe('ExchangeWrapper', () => { zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.NOT_ENOUGH_MAKER_ALLOWANCE); + )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_MAKER_ALLOWANCE); }); }); it('should throw when there would be a rounding error', async () => { @@ -215,7 +215,7 @@ describe('ExchangeWrapper', () => { zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmountThatCausesRoundingError, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.ROUNDING_ERROR); + )).to.be.rejectedWith(ExchangeContractErrs.ORDER_FILL_ROUNDING_ERROR); }); describe('should raise when not enough balance or allowance to pay fees', () => { const fillableAmount = new BigNumber(5); @@ -234,7 +234,7 @@ describe('ExchangeWrapper', () => { await zeroEx.token.transferAsync(zrxTokenAddress, makerAddress, coinbase, lackingBalance); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.NOT_ENOUGH_MAKER_FEE_BALANCE); + )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_MAKER_FEE_BALANCE); }); it('should throw when maker doesn\'t have enough allowance to pay fees', async () => { const newAllowanceWhichIsLessThanFees = makerFee.minus(1); @@ -242,14 +242,14 @@ describe('ExchangeWrapper', () => { newAllowanceWhichIsLessThanFees); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.NOT_ENOUGH_MAKER_FEE_ALLOWANCE); + )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_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); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.NOT_ENOUGH_TAKER_FEE_BALANCE); + )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_TAKER_FEE_BALANCE); }); it('should throw when taker doesn\'t have enough allowance to pay fees', async () => { const newAllowanceWhichIsLessThanFees = makerFee.minus(1); @@ -257,7 +257,7 @@ describe('ExchangeWrapper', () => { newAllowanceWhichIsLessThanFees); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(FillOrderValidationErrs.NOT_ENOUGH_TAKER_FEE_ALLOWANCE); + )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_TAKER_FEE_ALLOWANCE); }); }); }); -- cgit From 76280dd5dbc5a5a2fb5f7230fa73d594f822c7e6 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 2 Jun 2017 18:10:06 +0200 Subject: Address feedback --- test/exchange_wrapper_test.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/exchange_wrapper_test.ts') diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index c05c5c26f..87a6fbb85 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -176,7 +176,7 @@ describe('ExchangeWrapper', () => { zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_TAKER_BALANCE); + )).to.be.rejectedWith(ExchangeContractErrs.INSUFFICIENT_TAKER_BALANCE); }); it('should throw when taker allowance is less than fill amount', async () => { const newAllowanceWhichIsLessThanFillAmount = fillTakerAmount.minus(lackingAllowance); @@ -185,14 +185,14 @@ describe('ExchangeWrapper', () => { zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_TAKER_ALLOWANCE); + )).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); zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_MAKER_BALANCE); + )).to.be.rejectedWith(ExchangeContractErrs.INSUFFICIENT_MAKER_BALANCE); }); it('should throw when maker allowance is less than maker fill amount', async () => { const newAllowanceWhichIsLessThanFillAmount = fillTakerAmount.minus(lackingAllowance); @@ -201,7 +201,7 @@ describe('ExchangeWrapper', () => { zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_MAKER_ALLOWANCE); + )).to.be.rejectedWith(ExchangeContractErrs.INSUFFICIENT_MAKER_ALLOWANCE); }); }); it('should throw when there would be a rounding error', async () => { @@ -234,7 +234,7 @@ describe('ExchangeWrapper', () => { await zeroEx.token.transferAsync(zrxTokenAddress, makerAddress, coinbase, lackingBalance); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_MAKER_FEE_BALANCE); + )).to.be.rejectedWith(ExchangeContractErrs.INSUFFICIENT_MAKER_FEE_BALANCE); }); it('should throw when maker doesn\'t have enough allowance to pay fees', async () => { const newAllowanceWhichIsLessThanFees = makerFee.minus(1); @@ -242,14 +242,14 @@ describe('ExchangeWrapper', () => { newAllowanceWhichIsLessThanFees); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_MAKER_FEE_ALLOWANCE); + )).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); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_TAKER_FEE_BALANCE); + )).to.be.rejectedWith(ExchangeContractErrs.INSUFFICIENT_TAKER_FEE_BALANCE); }); it('should throw when taker doesn\'t have enough allowance to pay fees', async () => { const newAllowanceWhichIsLessThanFees = makerFee.minus(1); @@ -257,7 +257,7 @@ describe('ExchangeWrapper', () => { newAllowanceWhichIsLessThanFees); return expect(zeroEx.exchange.fillOrderAsync( signedOrder, fillTakerAmount, shouldCheckTransfer, - )).to.be.rejectedWith(ExchangeContractErrs.NOT_ENOUGH_TAKER_FEE_ALLOWANCE); + )).to.be.rejectedWith(ExchangeContractErrs.INSUFFICIENT_TAKER_FEE_ALLOWANCE); }); }); }); -- cgit From 199843718fba26db72db6196be5036339e0cf9f9 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 2 Jun 2017 18:13:22 +0200 Subject: Remove spaces --- test/exchange_wrapper_test.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'test/exchange_wrapper_test.ts') diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index 87a6fbb85..ed6f68954 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -115,7 +115,7 @@ describe('ExchangeWrapper', () => { let zrxTokenAddress: string; const fillTakerAmount = new BigNumber(5); const shouldCheckTransfer = false; - before('fetch tokens', async () => { + before(async () => { [coinbase, makerAddress, takerAddress, feeRecipient] = userAddresses; tokens = await zeroEx.tokenRegistry.getTokensAsync(); const tokenUtils = new TokenUtils(tokens); @@ -171,7 +171,6 @@ describe('ExchangeWrapper', () => { ); }); it('should throw when taker balance is less than fill amount', async () => { - await zeroEx.token.transferAsync(takerTokenAddress, takerAddress, coinbase, lackingBalance); zeroEx.setTransactionSenderAccount(takerAddress); return expect(zeroEx.exchange.fillOrderAsync( @@ -267,7 +266,6 @@ describe('ExchangeWrapper', () => { const signedOrder = await fillScenarios.createFillableSignedOrderAsync( makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount, ); - expect(await zeroEx.token.getBalanceAsync(makerTokenAddress, makerAddress)) .to.be.bignumber.equal(fillableAmount); expect(await zeroEx.token.getBalanceAsync(takerTokenAddress, makerAddress)) -- cgit From a52f834debc1727cee97c28f59e0973ba33bde7c Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 2 Jun 2017 18:16:55 +0200 Subject: Fix test name --- test/exchange_wrapper_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/exchange_wrapper_test.ts') diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index ed6f68954..f445e1202 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -203,7 +203,7 @@ describe('ExchangeWrapper', () => { )).to.be.rejectedWith(ExchangeContractErrs.INSUFFICIENT_MAKER_ALLOWANCE); }); }); - it('should throw when there would be a rounding error', async () => { + it('should throw when there a rounding error would have occurred', async () => { const makerFillableAmount = new BigNumber(3); const takerFillableAmount = new BigNumber(5); const signedOrder = await fillScenarios.createAsymetricFillableSignedOrderAsync( -- cgit From 7cf60b589b280c578bcde4b9209e70d07c92c241 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 2 Jun 2017 18:20:17 +0200 Subject: Address feedback --- test/exchange_wrapper_test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/exchange_wrapper_test.ts') diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index f445e1202..842d6de32 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -204,11 +204,11 @@ describe('ExchangeWrapper', () => { }); }); it('should throw when there a rounding error would have occurred', async () => { - const makerFillableAmount = new BigNumber(3); - const takerFillableAmount = new BigNumber(5); - const signedOrder = await fillScenarios.createAsymetricFillableSignedOrderAsync( + const makerAmount = new BigNumber(3); + const takerAmount = new BigNumber(5); + const signedOrder = await fillScenarios.createAsymmetricFillableSignedOrderAsync( makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, - makerFillableAmount, takerFillableAmount, + makerAmount, takerAmount, ); const fillTakerAmountThatCausesRoundingError = new BigNumber(3); zeroEx.setTransactionSenderAccount(takerAddress); @@ -216,7 +216,7 @@ describe('ExchangeWrapper', () => { signedOrder, fillTakerAmountThatCausesRoundingError, shouldCheckTransfer, )).to.be.rejectedWith(ExchangeContractErrs.ORDER_FILL_ROUNDING_ERROR); }); - describe('should raise when not enough balance or allowance to pay fees', () => { + describe('should throw when not enough balance or allowance to pay fees', () => { const fillableAmount = new BigNumber(5); const makerFee = new BigNumber(2); const takerFee = new BigNumber(2); -- cgit From cc6b27cbb179de3e5ac124bfddac63f66e16737a Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 2 Jun 2017 18:24:24 +0200 Subject: Address feedback --- test/exchange_wrapper_test.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/exchange_wrapper_test.ts') 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, -- cgit