Bitwarden client applications (web, browser extension, desktop, and cli)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

11 lines
473 B

import { TextEncoder, TextDecoder } from "util";
// SDK/WASM code relies on TextEncoder/TextDecoder being available globally
// We can't use `test.environment.ts` because that breaks other tests that rely on
// the default jest jsdom environment
if (!(globalThis as any).TextEncoder) {
(globalThis as any).TextEncoder = TextEncoder;
}
if (!(globalThis as any).TextDecoder) {
(globalThis as any).TextDecoder = TextDecoder as unknown as typeof globalThis.TextDecoder;
}