diff --git a/package.json b/package.json index 499babe452..4f3f3b09ca 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "scripts": { "run-ci": "./tools/ci.sh", - "reset:node-modules": "del-cli --dry-run '**/node_modules'", + "reset:node-modules": "del-cli '**/node_modules'", "reset:git": "git clean -f -X", "reset:yarn-lock": "del-cli yarn.lock && yarn install --update-checksums --force", "reset": "run-s reset:git reset:node-modules reset:yarn-lock configure", diff --git a/packages/cactus-common/src/main/typescript/strings.ts b/packages/cactus-common/src/main/typescript/strings.ts index 5493392572..51b74a0cc0 100644 --- a/packages/cactus-common/src/main/typescript/strings.ts +++ b/packages/cactus-common/src/main/typescript/strings.ts @@ -9,10 +9,17 @@ export class Strings { return source.replace(new RegExp(searchValue, "gm"), replaceValue); } - public static isString(val: any): boolean { + public static isString(val: any): val is string { return typeof val === "string" || val instanceof String; } + public static isNonBlank(val: unknown): val is string { + if (!Strings.isString(val)) { + return false; + } + return val.trim().length > 0; + } + public static dropNonPrintable(val: string): string { const fnTag = "Strings#dropNonPrintable()"; Checks.truthy(Strings.isString(val), `${fnTag} Strings.isString(val)`); diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts index 5ec79a2c3c..f188a55413 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts +++ b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts @@ -35,7 +35,7 @@ import { K_CACTUS_CORDA_TOTAL_TX_COUNT } from "../../../main/typescript/promethe const logLevel: LogLevelDesc = "TRACE"; -test("Tests are passing on the JVM side", async (t: Test) => { +test.skip("Tests are passing on the JVM side", async (t: Test) => { test.onFailure(async () => { await Containers.logDiagnostics({ logLevel }); });