Check WASMD_ENABLED

This commit is contained in:
Simon Warta 2020-09-30 13:00:43 +02:00
parent 698d241d80
commit f0b2df8a6c
2 changed files with 17 additions and 1 deletions

View File

@ -14,7 +14,12 @@ import {
import { assert, sleep } from "@cosmjs/utils";
import { LedgerSigner } from "./ledgersigner";
import { pendingWithoutLedger, pendingWithoutLedgerInteractive, wasmd } from "./testutils.spec";
import {
pendingWithoutLedger,
pendingWithoutLedgerInteractive,
pendingWithoutWasmd,
wasmd,
} from "./testutils.spec";
const interactiveTimeout = 120_000;
@ -114,6 +119,7 @@ describe("LedgerSigner", () => {
"creates signature accepted by launchpad backend",
async () => {
pendingWithoutLedgerInteractive();
pendingWithoutWasmd();
const signer = new LedgerSigner({
testModeAllowed: true,
hdPaths: [makeCosmoshubPath(0), makeCosmoshubPath(1), makeCosmoshubPath(10)],

View File

@ -18,6 +18,16 @@ export function pendingWithoutLedgerInteractive(): void {
}
}
export function wasmdEnabled(): boolean {
return !!process.env.WASMD_ENABLED;
}
export function pendingWithoutWasmd(): void {
if (!wasmdEnabled()) {
return pending("Set WASMD_ENABLED to enable Wasmd based tests");
}
}
export const wasmd = {
endpoint: "http://localhost:1317",
chainId: "testing",