ReferenceError: TextEncoder is not defined
What causes it and how to fix it:
- TextEncoder is not defined before your first test runs — a dependency needs it at import time and jsdom does not have itjsdom has no Encoding API and a dependency that builds new TextEncoder() at module level dies on import, before beforeAll; import a polyfill module first or use setupFiles, and make the dependency lazyCause and fix →