Skip to content

Commit af37020

Browse files
committed
fix: workaround test with jsdom and TextEncoder
1 parent 2072177 commit af37020

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/setupTests.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
// expect(element).toHaveTextContent(/react/i)
44
// learn more: https://github.com/testing-library/jest-dom
55
import "@testing-library/jest-dom";
6+
import { TextEncoder } from 'util';
67

8+
global.TextEncoder = TextEncoder;
79
window.scrollTo = jest.fn();

0 commit comments

Comments
 (0)