Update test for required amountAvailableToFill

This commit is contained in:
Steve Klebanoff
2019-01-11 09:20:59 -08:00
parent cf3787edbb
commit 64a78149aa
2 changed files with 3 additions and 3 deletions

View File

@@ -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', () => {

View File

@@ -6,7 +6,7 @@ export const testHelpers = {
expectInsufficientLiquidityError: (
expect: Chai.ExpectStatic,
functionWhichTriggersError: () => void,
expectedAmountAvailableToFill?: BigNumber,
expectedAmountAvailableToFill: BigNumber,
): void => {
let wasErrorThrown = false;
try {