mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Add type test
This commit is contained in:
parent
7435ea8d23
commit
31fae80b0e
@ -418,6 +418,14 @@ describe("CosmWasmClient", () => {
|
||||
const client = await CosmWasmClient.connect(wasmd.endpoint);
|
||||
const result = await client.queryContractSmart(contract.address, { verifier: {} });
|
||||
expect(result).toEqual({ verifier: contract.instantiateMsg.verifier });
|
||||
|
||||
// Typed request (https://github.com/cosmos/cosmjs/pull/1281)
|
||||
interface VerifierQuery {
|
||||
verifier: Record<string, never>;
|
||||
}
|
||||
const request: VerifierQuery = { verifier: {} };
|
||||
const result2 = await client.queryContractSmart(contract.address, request);
|
||||
expect(result2).toEqual({ verifier: contract.instantiateMsg.verifier });
|
||||
});
|
||||
|
||||
it("errors for malformed query message", async () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user