mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-30 11:25:52 -05:00
Co-authored-by: Anthony <anthony@infraly.co> Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
11 lines
400 B
TypeScript
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 = () => {};
|
|
}
|