delete-me/test/account.test.ts

18 lines
632 B
TypeScript
Raw Permalink Normal View History

2023-03-24 11:32:38 +00:00
import {cliTest} from './helper';
const args= "account "
2023-03-29 08:17:42 +00:00
const type= "aphoton"
const quantity="10"
const address="ethm1vc62ysqu504at932jjq8pwrqgjt67rx6ggn5yu"
2023-03-24 11:32:38 +00:00
describe("test account",() => {
it("get account should return account details",async ()=>{
2023-03-29 08:17:42 +00:00
// send tokens to account to avoid account not found error
const sendResp=cliTest("tokens send --address "+address+" --type "+type+" --quantity "+quantity)
2023-03-29 11:40:16 +00:00
expect(sendResp).toBeDefined();
2023-03-29 08:17:42 +00:00
const resp=cliTest(args+"get --address "+address);
2023-03-29 11:40:16 +00:00
expect(resp).toBeDefined();
2023-03-29 08:17:42 +00:00
expect(resp[0].address).toEqual(address)
2023-03-24 11:32:38 +00:00
});
});