cli: polyfill for older node versions

This commit is contained in:
Florian Dold 2021-07-13 13:55:43 +02:00
parent dd92fea21e
commit 50bbaa40db
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -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,