diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/exchange_wrapper_test.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts index 6425e308a..cda2d4435 100644 --- a/test/exchange_wrapper_test.ts +++ b/test/exchange_wrapper_test.ts @@ -344,6 +344,16 @@ describe('ExchangeWrapper', () => { makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount, ); const partialFillAmount = new BigNumber(3); + const filledAmount = await zeroEx.exchange.fillOrderAsync( + signedOrder, partialFillAmount, shouldCheckTransfer, takerAddress); + expect(filledAmount).to.be.bignumber.equal(partialFillAmount); + }); + it('should return the partially filled amount \ + if the fill amount specified is greater then the amount available', async () => { + const signedOrder = await fillScenarios.createFillableSignedOrderAsync( + makerTokenAddress, takerTokenAddress, makerAddress, takerAddress, fillableAmount, + ); + const partialFillAmount = new BigNumber(3); await zeroEx.exchange.fillOrderAsync( signedOrder, partialFillAmount, shouldCheckTransfer, takerAddress); const missingBalance = new BigNumber(1); |