From 7ac169d82241d9beb8f47b8320592c22d25aaa03 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 25 Jan 2024 14:10:35 +0530 Subject: [PATCH] Add placeholders for remaining tests --- test/cli.test.ts | 78 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 2 deletions(-) diff --git a/test/cli.test.ts b/test/cli.test.ts index 7743562..3ec345b 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -32,6 +32,8 @@ describe('Test laconic CLI commands', () => { expect(errorOutput).toContain('Commands:'); }); + // TODO: Add tests for CNS commands with all available flags + describe('laconic CNS commands', () => { const initialAccountBalance = Number('100000000000000000000000000'); const testAccount = process.env.TEST_ACCOUNT; @@ -60,7 +62,7 @@ describe('Test laconic CLI commands', () => { const bondOwner = testAccount; let bondId: string; - test('laconic cns bond create', async () => { + test('laconic cns bond create --type --quantity ', async () => { const result = spawnSync('laconic', ['cns', 'bond', 'create', '--type', TOKEN_TYPE, '--quantity', bondBalance.toString(), '--gas', '200000', '--fees', `200000${TOKEN_TYPE}`]); const outputObj = checkResultAndRetrieveOutput(result); @@ -102,6 +104,18 @@ describe('Test laconic CLI commands', () => { expect(outputObj.length).toEqual(1); expect(outputObj[0]).toEqual(expectedBond); }); + + test('laconic cns bond refill --id --type --quantity ', async () => { + // TODO + }); + + test('laconic cns bond withdraw --id --type --quantity ', async () => { + // TODO + }); + + test('laconic cns bond cancel --id ', async () => { + // TODO + }); }); describe('Account and tokens operations', () => { @@ -187,9 +201,23 @@ describe('Test laconic CLI commands', () => { expect(outputObj.length).toEqual(1); expect(outputObj[0]).toMatchObject(expectedRecord); }); + + describe('Bond records operations', () => { + test('laconic cns bond associate --id --bond-id ', async () => { + // TODO + }); + + test('laconic cns bond dissociate --id ', async () => { + // TODO + }); + + test('laconic cns bond records reassociate --old-bond-id --new-bond-id ', async () => { + // TODO + }); + }); }); - describe('Name authority operations', () => { + describe('Name authority operations (pre auction)', () => { const authorityName = 'laconic'; test('laconic cns authority reserve ', async () => { @@ -213,6 +241,52 @@ describe('Test laconic CLI commands', () => { expect(outputObj[0].height).toBeGreaterThan(0); }); }); + + describe('Auction operations', () => { + test('laconic cns auction get ', async () => { + // TODO + }); + + test('laconic cns auction bid commit ', async () => { + // TODO + }); + + test('laconic cns auction bid reveal ', async () => { + // TODO + }); + }); + + describe('Name authority operations (post auction)', () => { + test('laconic cns authority bond set laconic ', async () => { + // TODO + }); + + test('laconic cns authority reserve (same owner)', async () => { + // TODO + }); + + test('laconic cns authority reserve --owner (different owner)', async () => { + // TODO + }); + }); + + describe('Name operations', () => { + test('laconic cns name set ', async () => { + // TODO + }); + + test('laconic cns name lookup ', async () => { + // TODO + }); + + test('laconic cns name resolve ', async () => { + // TODO + }); + + test('laconic cns name delete ', async () => { + // TODO + }); + }); }); });