Merge pull request #1511 from 0xProject/fix/asset-buyer/zero-amount-available-test
Fix expectedAmountAvailableToFill test
This commit is contained in:
		@@ -168,7 +168,7 @@ describe('buyQuoteCalculator', () => {
 | 
				
			|||||||
                };
 | 
					                };
 | 
				
			||||||
                testHelpers.expectInsufficientLiquidityError(expect, errorFunction, new BigNumber(1));
 | 
					                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({
 | 
					                const smallOrder = orderFactory.createSignedOrderFromPartial({
 | 
				
			||||||
                    makerAssetAmount: new BigNumber(1),
 | 
					                    makerAssetAmount: new BigNumber(1),
 | 
				
			||||||
                    takerAssetAmount: new BigNumber(1),
 | 
					                    takerAssetAmount: new BigNumber(1),
 | 
				
			||||||
@@ -184,7 +184,7 @@ describe('buyQuoteCalculator', () => {
 | 
				
			|||||||
                        false,
 | 
					                        false,
 | 
				
			||||||
                    );
 | 
					                    );
 | 
				
			||||||
                };
 | 
					                };
 | 
				
			||||||
                testHelpers.expectInsufficientLiquidityError(expect, errorFunction, undefined);
 | 
					                testHelpers.expectInsufficientLiquidityError(expect, errorFunction, new BigNumber(0));
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        it('should not throw if order is fillable', () => {
 | 
					        it('should not throw if order is fillable', () => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,7 @@ export const testHelpers = {
 | 
				
			|||||||
    expectInsufficientLiquidityError: (
 | 
					    expectInsufficientLiquidityError: (
 | 
				
			||||||
        expect: Chai.ExpectStatic,
 | 
					        expect: Chai.ExpectStatic,
 | 
				
			||||||
        functionWhichTriggersError: () => void,
 | 
					        functionWhichTriggersError: () => void,
 | 
				
			||||||
        expectedAmountAvailableToFill?: BigNumber,
 | 
					        expectedAmountAvailableToFill: BigNumber,
 | 
				
			||||||
    ): void => {
 | 
					    ): void => {
 | 
				
			||||||
        let wasErrorThrown = false;
 | 
					        let wasErrorThrown = false;
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user