79314870

Date: 2024-12-29 02:22:48
Score: 1
Natty:
Report link

**In my case I work with react-vite and the error was

"Test suite failed to run ReferenceError: TextEncoder is not defined"

but all I do to fix it was update the jest.setup.js with this**

import { TextDecoder, TextEncoder } from 'util';
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Andres