We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f8ef91 commit e39d698Copy full SHA for e39d698
src/renderer/__helpers__/jest.setup.ts
@@ -1,6 +1,10 @@
1
import { TextDecoder, TextEncoder } from 'node:util';
2
3
-// Prevent "ReferenceError: TextEncoder is not defined" or "ReferenceError: TextDecoder is not defined" errors
+/**
4
+ * Prevent the following errors with jest:
5
+ * - ReferenceError: TextEncoder is not defined
6
+ * - ReferenceError: TextDecoder is not defined
7
+ */
8
if (!global.TextEncoder || !global.TextDecoder) {
9
global.TextEncoder = TextEncoder;
10
global.TextDecoder = TextDecoder;
0 commit comments