Merge pull request #604 from cosmos/fix-test-env-checks-cw-stargate

Fix test env checks in CosmWasm Stargate
This commit is contained in:
Simon Warta 2021-01-07 13:30:54 +01:00 committed by GitHub
commit 0d030633fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -42,6 +42,7 @@ interface HackatomInstance {
describe("CosmWasmClient", () => {
describe("connect", () => {
it("can be constructed", async () => {
pendingWithoutWasmd();
const client = await CosmWasmClient.connect(wasmd.endpoint);
expect(client).toBeTruthy();
});

View File

@ -27,12 +27,14 @@ const { Tx } = codec.cosmos.tx.v1beta1;
describe("SigningCosmWasmClient", () => {
describe("connectWithWallet", () => {
it("can be constructed", async () => {
pendingWithoutWasmd();
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix);
const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet);
expect(client).toBeTruthy();
});
it("can be constructed with custom gas price", async () => {
pendingWithoutWasmd();
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix);
const gasPrice = GasPrice.fromString("3.14utest");
const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet, { gasPrice });
@ -66,6 +68,7 @@ describe("SigningCosmWasmClient", () => {
});
it("can be constructed with custom gas limits", async () => {
pendingWithoutWasmd();
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix);
const gasLimits = {
send: 160000,
@ -101,6 +104,7 @@ describe("SigningCosmWasmClient", () => {
});
it("can be constructed with custom gas price and gas limits", async () => {
pendingWithoutWasmd();
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix);
const gasPrice = GasPrice.fromString("3.14utest");
const gasLimits = {