refactor helper.ts/createAuthority
This commit is contained in:
parent
b76f52013b
commit
2cc5ae6245
@ -20,12 +20,15 @@ export function createRecord(filepath: string, bondId: string):string{
|
|||||||
return resp.id
|
return resp.id
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createAuthority(name:string):string{
|
export function createAuthority(name:string):any{
|
||||||
const resp=cliTest("authority reserve "+name);
|
const resp=cliTest("authority reserve "+name);
|
||||||
expect(resp).toBeDefined;
|
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;
|
expect(jsonResp).toBeDefined;
|
||||||
|
|
||||||
return jsonResp[0].auction.id
|
return jsonResp[0].auction.id
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user