aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-07-13 13:55:43 +0200
committerFlorian Dold <florian@dold.me>2021-07-13 13:55:52 +0200
commit50bbaa40db578ea9261099a9da5a2743ff31197b (patch)
tree2446dc2f98248454fc1b2ea2bcc5bb7173589c40
parentdd92fea21efe2399cc16b219bd481252954b31dc (diff)
cli: polyfill for older node versions
-rw-r--r--packages/taler-wallet-cli/src/index.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts
index 2fac85a7e..091ca2ff8 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -21,6 +21,12 @@ import os from "os";
import fs from "fs";
import * as clk from "./clk.js";
import { deepStrictEqual } from "assert";
+// Polyfill for encoding which isn't present globally in older nodejs versions
+import { TextEncoder, TextDecoder } from "util";
+// @ts-ignore
+global.TextEncoder = TextEncoder;
+// @ts-ignore
+global.TextDecoder = TextDecoder;
import { getTestInfo, runTests } from "./integrationtests/testrunner.js";
import {
PreparePayResultType,