Skip to content

Commit c8b3703

Browse files
Fix tests
1 parent 80161ac commit c8b3703

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/setupTests.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
import "regenerator-runtime/runtime";
2+
import { TextEncoder, TextDecoder } from "util";
3+
4+
// Polyfill TextEncoder/TextDecoder for React 18
5+
global.TextEncoder = TextEncoder;
6+
global.TextDecoder = TextDecoder;
7+
28

39
if (window.document) {
410
window.document.body.createTextRange = function () {

0 commit comments

Comments
 (0)