From 30861621cf1f31b808e358a2d707b549f2c31ffd Mon Sep 17 00:00:00 2001 From: 0xmuralik Date: Wed, 29 Mar 2023 13:45:51 +0530 Subject: [PATCH] catch erros --- test/helper.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/helper.ts b/test/helper.ts index 40f616a..8264a6c 100644 --- a/test/helper.ts +++ b/test/helper.ts @@ -1,7 +1,11 @@ const { execSync } = require("child_process"); export const cliTest = (args: any) => { - return JSON.parse(execSync(`./bin/laconic cns ${args}`)); + try{ + return JSON.parse(execSync(`./bin/laconic cns ${args}`)); + }catch(err){ + return(err) + } }; export function createBond(type: string, quantity: string):string{