From 2cc5ae6245238dbd6da4fc436be423c29f7bfbdf Mon Sep 17 00:00:00 2001 From: 0xmuralik Date: Fri, 31 Mar 2023 23:49:16 +0530 Subject: [PATCH] refactor helper.ts/createAuthority --- test/helper.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/helper.ts b/test/helper.ts index 7114aef..ca83f8f 100644 --- a/test/helper.ts +++ b/test/helper.ts @@ -20,12 +20,15 @@ export function createRecord(filepath: string, bondId: string):string{ return resp.id } -export function createAuthority(name:string):string{ +export function createAuthority(name:string):any{ const resp=cliTest("authority reserve "+name); expect(resp).toBeDefined; + expect(resp.success).toBeTruthy(); + return resp +} - const jsonResp = JSON.parse(cliTest("authority whois "+name)) +export function getAuctionId(name:string):string{ + const jsonResp = cliTest("authority whois "+name) expect(jsonResp).toBeDefined; - return jsonResp[0].auction.id } \ No newline at end of file