Skip to content

Commit

Permalink
lint: require -> import
Browse files Browse the repository at this point in the history
  • Loading branch information
Schwehn42 committed Dec 16, 2024
1 parent 07ce47c commit 5a44c31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
// learn more: https://github.com/testing-library/jest-dom
import "@testing-library/jest-dom";

import {TextEncoder} from "util";

global.ResizeObserver = require("resize-observer-polyfill");

// global.TextDecoder = require('util').TextDecoder;
global.TextEncoder = require("util").TextEncoder;
global.TextEncoder = TextEncoder;

// jest can't handle match media, and the official workaround doesn't work (lol):
// https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom
Expand Down

0 comments on commit 5a44c31

Please sign in to comment.