Skip to content

Commit

Permalink
testcase: add gov query test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
fly33499 committed Oct 18, 2021
1 parent a464745 commit 31210c6
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions test/17.gov_query.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { ProposalStatus } from '../sdk/firmachain/gov';
import { FirmaSDK } from "../sdk/FirmaSDK"
import { TestChainConfig } from './config_test';

describe('[17. Gov Query Test]', () => {

const firma = new FirmaSDK(TestChainConfig);

it('get getProposalList', async () => {

let proposalList = await firma.Gov.getProposalList();
//console.log(proposalList);
})

it('get getProposalListByStatus', async () => {

let status = ProposalStatus.PROPOSAL_STATUS_REJECTED;
let proposalList = await firma.Gov.getProposalListByStatus(status);

//console.log(proposalList);
})

it('get getProposal', async () => {

const id = "1";
let proposal = await firma.Gov.getProposal(id);
//console.log(proposal);
})

// integrated function with params/voting, params/deposit, params/tallying
it('get params', async () => {

let param = await firma.Gov.getParam();
//console.log(param);
})

});

0 comments on commit 31210c6

Please sign in to comment.