Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1511 from 0xProject/fix/asset-buyer/zero-amount-a…
Browse files Browse the repository at this point in the history
…vailable-test

Fix expectedAmountAvailableToFill  test
Steve Klebanoff authored Jan 15, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents f570f80 + 7a2b312 commit 39816be
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/asset-buyer/test/buy_quote_calculator_test.ts
Original file line number Diff line number Diff line change
@@ -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', () => {
2 changes: 1 addition & 1 deletion packages/asset-buyer/test/utils/test_helpers.ts
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ export const testHelpers = {
expectInsufficientLiquidityError: (
expect: Chai.ExpectStatic,
functionWhichTriggersError: () => void,
expectedAmountAvailableToFill?: BigNumber,
expectedAmountAvailableToFill: BigNumber,
): void => {
let wasErrorThrown = false;
try {

0 comments on commit 39816be

Please sign in to comment.