testing-library / dom-testing-library

🐙 Simple and complete DOM testing utilities that encourage good testing practices.

Home Page:https://testing-library.com/dom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TextEncoder is not defined

nikgun1984 opened this issue · comments

After upgrading to jest29.5 from jest27, i am getting the following error: "ReferenceError: TextEncoder is not defined". I imported TextEncoder from utils but it still shows the same error. > 10 | import { JSDOM } from 'jsdom'

This looks like an issue in jest and not something we have a way to fix. There are some workarounds already available so I'm closing this one.
Thanks.

This is not an issue in jest, it's in jsdom, been like that for years and we can only work around it until it's fixed.
jsdom/jsdom#2524