2023-03-26 20:12:52 +00:00
|
|
|
import {cliTest,createBond,createRecord} from './helper';
|
2023-03-24 11:32:38 +00:00
|
|
|
|
|
|
|
const args= "name "
|
|
|
|
|
|
|
|
var recordId: string;
|
|
|
|
var name: string;
|
|
|
|
|
|
|
|
describe("test names",() => {
|
|
|
|
|
|
|
|
beforeAll(async () => {
|
2023-03-26 20:12:52 +00:00
|
|
|
// get bond id
|
|
|
|
const bondId = createBond("aphoton","10000000")
|
|
|
|
|
2023-03-24 11:32:38 +00:00
|
|
|
// get record id
|
2023-03-26 20:12:52 +00:00
|
|
|
recordId=createRecord("./test/examples/watcher.yml",bondId)
|
2023-03-24 11:32:38 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it("set name",async ()=>{
|
|
|
|
const resp=cliTest(args+"set "+name+" "+recordId);
|
|
|
|
expect(resp).toBeDefined;
|
|
|
|
});
|
|
|
|
|
|
|
|
it("lookup name",async ()=>{
|
|
|
|
const resp=cliTest(args+"lookup "+ name);
|
|
|
|
expect(resp).toBeDefined;
|
|
|
|
});
|
|
|
|
|
|
|
|
it("resolve name",async ()=>{
|
|
|
|
const resp=cliTest(args+"resolve "+name);
|
|
|
|
expect(resp).toBeDefined;
|
|
|
|
});
|
|
|
|
|
|
|
|
it("delelte name",async ()=>{
|
|
|
|
const resp=cliTest(args+"delete "+name);
|
|
|
|
expect(resp).toBeDefined;
|
|
|
|
});
|
|
|
|
});
|