Update test for required amountAvailableToFill
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
@@ -6,7 +6,7 @@ export const testHelpers = {
|
||||
expectInsufficientLiquidityError: (
|
||||
expect: Chai.ExpectStatic,
|
||||
functionWhichTriggersError: () => void,
|
||||
expectedAmountAvailableToFill?: BigNumber,
|
||||
expectedAmountAvailableToFill: BigNumber,
|
||||
): void => {
|
||||
let wasErrorThrown = false;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user