From ab10119c5af208be60782395b1faff906f0948f2 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 14 Dec 2018 15:24:01 -0800 Subject: one more test for undefined --- packages/instant/test/util/asset.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'packages/instant') diff --git a/packages/instant/test/util/asset.test.ts b/packages/instant/test/util/asset.test.ts index dbf2e15a5..213e69dd8 100644 --- a/packages/instant/test/util/asset.test.ts +++ b/packages/instant/test/util/asset.test.ts @@ -83,7 +83,12 @@ describe('assetDataUtil', () => { assetUtils.assetBuyerErrorMessage(WAX_ASSET, new InsufficientAssetLiquidityError(amountAvailable)), ).toEqual('There are only 3 WAX available to buy'); }); - it('should generic message when amount available rounds to zero', () => { + it('should return generic message when InsufficientAssetLiquidityError contains undefined value', () => { + expect(assetUtils.assetBuyerErrorMessage(ZRX_ASSET, new InsufficientAssetLiquidityError())).toEqual( + 'Not enough ZRX available', + ); + }); + it('should return generic message when amount available rounds to zero', () => { const amountAvailable = Web3Wrapper.toBaseUnitAmount(new BigNumber(0.002), 18); expect( assetUtils.assetBuyerErrorMessage(ZRX_ASSET, new InsufficientAssetLiquidityError(amountAvailable)), -- cgit v1.2.3