Skip to content

Commit b417895

Browse files
committed
Update setupTests.ts
1 parent ef1308c commit b417895

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/shared/utils/tests/setupTests.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
// The order is important here!
2+
import { TextDecoder, TextEncoder } from "util";
3+
4+
if (typeof global.TextDecoder === "undefined") {
5+
(global as any).TextDecoder = TextDecoder;
6+
}
7+
8+
if (typeof global.TextEncoder === "undefined") {
9+
global.TextEncoder = TextEncoder;
10+
}
11+
12+
213
import "./mockMatchMedia";
314
import "@/projectSetupImports";
415
import "./mockConfig";

0 commit comments

Comments
 (0)