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

Fix expectedAmountAvailableToFill test #1511

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Expand Up @@ -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),
Expand All @@ -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', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/asset-buyer/test/utils/test_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const testHelpers = {
expectInsufficientLiquidityError: (
expect: Chai.ExpectStatic,
functionWhichTriggersError: () => void,
expectedAmountAvailableToFill?: BigNumber,
expectedAmountAvailableToFill: BigNumber,
): void => {
let wasErrorThrown = false;
try {
Expand Down