Files
pterodactyl-panel/resources/scripts/setup-tests.ts
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

11 lines
400 B
TypeScript

import '@testing-library/jest-dom/vitest';
// jsdom lacks PointerEvent, which Base UI dispatches.
if (globalThis.window?.PointerEvent === undefined && globalThis.window?.MouseEvent) {
Object.defineProperty(globalThis.window, 'PointerEvent', { value: globalThis.window.MouseEvent });
}
if (globalThis.window?.navigator.userAgent.includes('jsdom')) {
globalThis.window.scrollTo = () => {};
}