laconic-registry-cli/test/record.test.ts

30 lines
719 B
TypeScript
Raw Normal View History

2023-03-26 20:12:52 +00:00
import {cliTest,createBond} from './helper';
2023-03-24 11:32:38 +00:00
const args= "record "
2023-03-26 20:12:52 +00:00
const filename = "./test/examples/watcher.yml"
2023-03-24 11:32:38 +00:00
var recordId: string;
var bondId: string;
2023-03-26 20:12:52 +00:00
describe("test record",() => {
2023-03-24 11:32:38 +00:00
beforeAll(async () => {
2023-03-26 20:12:52 +00:00
// get bondId
bondId=createBond("aphoton","1000000000")
2023-03-24 11:32:38 +00:00
});
it("publish record",async ()=>{
const resp=cliTest(args+"publish --filename "+filename+" --bond-id "+bondId);
expect(resp).toBeDefined;
});
it("get record",async ()=>{
const resp=cliTest(args+"get --id "+recordId);
expect(resp).toBeDefined;
});
it("list records",async ()=>{
const resp=cliTest(args+"list");
expect(resp).toBeDefined;
});
});