We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80161ac commit c8b3703Copy full SHA for c8b3703
src/test/setupTests.js
@@ -1,4 +1,10 @@
1
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
8
9
if (window.document) {
10
window.document.body.createTextRange = function () {
0 commit comments