mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 08:42:13 +02:00
15 lines
465 B
TypeScript
15 lines
465 B
TypeScript
import "@testing-library/jest-dom";
|
|
import { TextEncoder, TextDecoder } from "util";
|
|
|
|
// Polyfill TextEncoder/TextDecoder for jsdom
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
(global as any).TextEncoder = TextEncoder;
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
(global as any).TextDecoder = TextDecoder;
|
|
|
|
// Mock window.scrollTo for jsdom
|
|
Object.defineProperty(window, "scrollTo", {
|
|
value: jest.fn(),
|
|
writable: true,
|
|
});
|