mirror of
https://github.com/coder/coder.git
synced 2026-09-21 20:51:01 +08:00
chore: implement tests for dynamic parameter component (#18745)
This commit is contained in:
@@ -40,6 +40,12 @@ jest.mock("contexts/useProxyLatency", () => ({
|
||||
global.scrollTo = jest.fn();
|
||||
|
||||
window.HTMLElement.prototype.scrollIntoView = jest.fn();
|
||||
// Polyfill pointer capture methods for JSDOM compatibility with Radix UI
|
||||
window.HTMLElement.prototype.hasPointerCapture = jest
|
||||
.fn()
|
||||
.mockReturnValue(false);
|
||||
window.HTMLElement.prototype.setPointerCapture = jest.fn();
|
||||
window.HTMLElement.prototype.releasePointerCapture = jest.fn();
|
||||
window.open = jest.fn();
|
||||
navigator.sendBeacon = jest.fn();
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user