Sort toAmino/fromAmino test code
This commit is contained in:
parent
aa2c9421f9
commit
e2e8eeec06
@ -37,6 +37,8 @@ import { AminoTypes } from "./aminotypes";
|
||||
|
||||
describe("AminoTypes", () => {
|
||||
describe("toAmino", () => {
|
||||
// bank
|
||||
|
||||
it("works for MsgSend", () => {
|
||||
const msg: MsgSend = {
|
||||
fromAddress: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||
@ -89,6 +91,8 @@ describe("AminoTypes", () => {
|
||||
expect(aminoMsg).toEqual(expected);
|
||||
});
|
||||
|
||||
// distribution
|
||||
|
||||
it("works for MsgFundCommunityPool", async () => {
|
||||
const msg: MsgFundCommunityPool = {
|
||||
amount: coins(1234, "ucosm"),
|
||||
@ -163,6 +167,8 @@ describe("AminoTypes", () => {
|
||||
expect(aminoMsg).toEqual(expected);
|
||||
});
|
||||
|
||||
// staking
|
||||
|
||||
it("works for MsgBeginRedelegate", () => {
|
||||
const msg: MsgBeginRedelegate = {
|
||||
delegatorAddress: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||
@ -318,6 +324,8 @@ describe("AminoTypes", () => {
|
||||
expect(aminoMsg).toEqual(expected);
|
||||
});
|
||||
|
||||
// ibc
|
||||
|
||||
it("works for MsgTransfer", () => {
|
||||
const msg: MsgTransfer = {
|
||||
sourcePort: "testport",
|
||||
@ -417,6 +425,8 @@ describe("AminoTypes", () => {
|
||||
expect(aminoMsg).toEqual(expected);
|
||||
});
|
||||
|
||||
// other
|
||||
|
||||
it("works with custom type url", () => {
|
||||
const msg = {
|
||||
foo: "bar",
|
||||
@ -483,6 +493,8 @@ describe("AminoTypes", () => {
|
||||
});
|
||||
|
||||
describe("fromAmino", () => {
|
||||
// bank
|
||||
|
||||
it("works for MsgSend", () => {
|
||||
const aminoMsg: AminoMsgSend = {
|
||||
type: "cosmos-sdk/MsgSend",
|
||||
@ -535,6 +547,15 @@ describe("AminoTypes", () => {
|
||||
});
|
||||
});
|
||||
|
||||
// distribution
|
||||
|
||||
// TODO: MsgFundCommunityPool
|
||||
// TODO: MsgSetWithdrawAddress
|
||||
// TODO: MsgWithdrawDelegatorReward
|
||||
// TODO: MsgWithdrawValidatorCommission
|
||||
|
||||
// staking
|
||||
|
||||
it("works for MsgBeginRedelegate", () => {
|
||||
const aminoMsg: AminoMsgBeginRedelegate = {
|
||||
type: "cosmos-sdk/MsgBeginRedelegate",
|
||||
@ -690,6 +711,8 @@ describe("AminoTypes", () => {
|
||||
});
|
||||
});
|
||||
|
||||
// ibc
|
||||
|
||||
it("works for MsgTransfer", () => {
|
||||
const aminoMsg: AminoMsgTransfer = {
|
||||
type: "cosmos-sdk/MsgTransfer",
|
||||
@ -760,6 +783,8 @@ describe("AminoTypes", () => {
|
||||
});
|
||||
});
|
||||
|
||||
// other
|
||||
|
||||
it("works for custom type url", () => {
|
||||
const aminoMsg = {
|
||||
type: "my-sdk/CustomType",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user