aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-15 07:24:01 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-15 07:34:45 +0800
commitab10119c5af208be60782395b1faff906f0948f2 (patch)
treee911e1eaebcc6c37496019918aa6b055573bc744 /packages/instant
parent5981823ac14f8f129e1866c3e39caed2211d5cea (diff)
downloaddexon-sol-tools-ab10119c5af208be60782395b1faff906f0948f2.tar
dexon-sol-tools-ab10119c5af208be60782395b1faff906f0948f2.tar.gz
dexon-sol-tools-ab10119c5af208be60782395b1faff906f0948f2.tar.bz2
dexon-sol-tools-ab10119c5af208be60782395b1faff906f0948f2.tar.lz
dexon-sol-tools-ab10119c5af208be60782395b1faff906f0948f2.tar.xz
dexon-sol-tools-ab10119c5af208be60782395b1faff906f0948f2.tar.zst
dexon-sol-tools-ab10119c5af208be60782395b1faff906f0948f2.zip
one more test for undefined
Diffstat (limited to 'packages/instant')
-rw-r--r--packages/instant/test/util/asset.test.ts7
1 files changed, 6 insertions, 1 deletions
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)),