diff options
author | Steve Klebanoff <steve@0xproject.com> | 2019-01-16 05:04:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-16 05:04:55 +0800 |
commit | 39816bef8fab0749a9ef2611db625b4f9b66a428 (patch) | |
tree | 6d7b030abe774c619067ae52e0ef1cf7ebdd0963 | |
parent | f570f80674c22f69712c45e8e3c48e948b51f357 (diff) | |
parent | 7a2b312d64994f96db75864e9a61bb319efdda3a (diff) | |
download | dexon-sol-tools-39816bef8fab0749a9ef2611db625b4f9b66a428.tar dexon-sol-tools-39816bef8fab0749a9ef2611db625b4f9b66a428.tar.gz dexon-sol-tools-39816bef8fab0749a9ef2611db625b4f9b66a428.tar.bz2 dexon-sol-tools-39816bef8fab0749a9ef2611db625b4f9b66a428.tar.lz dexon-sol-tools-39816bef8fab0749a9ef2611db625b4f9b66a428.tar.xz dexon-sol-tools-39816bef8fab0749a9ef2611db625b4f9b66a428.tar.zst dexon-sol-tools-39816bef8fab0749a9ef2611db625b4f9b66a428.zip |
Merge pull request #1511 from 0xProject/fix/asset-buyer/zero-amount-available-test
Fix expectedAmountAvailableToFill test
-rw-r--r-- | packages/asset-buyer/test/buy_quote_calculator_test.ts | 4 | ||||
-rw-r--r-- | packages/asset-buyer/test/utils/test_helpers.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/asset-buyer/test/buy_quote_calculator_test.ts b/packages/asset-buyer/test/buy_quote_calculator_test.ts index fdc17ef25..880f55180 100644 --- a/packages/asset-buyer/test/buy_quote_calculator_test.ts +++ b/packages/asset-buyer/test/buy_quote_calculator_test.ts @@ -168,7 +168,7 @@ describe('buyQuoteCalculator', () => { }; testHelpers.expectInsufficientLiquidityError(expect, errorFunction, new BigNumber(1)); }); - it('should throw without amount available to fill if amount rounds to 0', () => { + it('should throw with 0 available to fill if amount rounds to 0', () => { const smallOrder = orderFactory.createSignedOrderFromPartial({ makerAssetAmount: new BigNumber(1), takerAssetAmount: new BigNumber(1), @@ -184,7 +184,7 @@ describe('buyQuoteCalculator', () => { false, ); }; - testHelpers.expectInsufficientLiquidityError(expect, errorFunction, undefined); + testHelpers.expectInsufficientLiquidityError(expect, errorFunction, new BigNumber(0)); }); }); it('should not throw if order is fillable', () => { diff --git a/packages/asset-buyer/test/utils/test_helpers.ts b/packages/asset-buyer/test/utils/test_helpers.ts index 9c7c244af..04a58d2c8 100644 --- a/packages/asset-buyer/test/utils/test_helpers.ts +++ b/packages/asset-buyer/test/utils/test_helpers.ts @@ -6,7 +6,7 @@ export const testHelpers = { expectInsufficientLiquidityError: ( expect: Chai.ExpectStatic, functionWhichTriggersError: () => void, - expectedAmountAvailableToFill?: BigNumber, + expectedAmountAvailableToFill: BigNumber, ): void => { let wasErrorThrown = false; try { |