Skip to content

Commit 227085a

Browse files
committed
chore: test improvements
1 parent 59c8b56 commit 227085a

File tree

2 files changed

+920
-0
lines changed

2 files changed

+920
-0
lines changed

site/jest.setup.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ jest.mock("contexts/useProxyLatency", () => ({
4040
global.scrollTo = jest.fn();
4141

4242
window.HTMLElement.prototype.scrollIntoView = jest.fn();
43+
// Polyfill pointer capture methods for JSDOM compatibility with Radix UI
44+
window.HTMLElement.prototype.hasPointerCapture = jest
45+
.fn()
46+
.mockReturnValue(false);
47+
window.HTMLElement.prototype.setPointerCapture = jest.fn();
48+
window.HTMLElement.prototype.releasePointerCapture = jest.fn();
4349
window.open = jest.fn();
4450
navigator.sendBeacon = jest.fn();
4551

0 commit comments

Comments
 (0)