Merge pull request #1217 from PR0M3TH3AN/fix-popover-tests-jsdom-ref-3613247743198183095

Fix popover engine unit tests for JSDOM compatibility
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-01-13 23:35:23 -05:00
commit 148ca01281
1 file changed
+3 -1
+3 -1
View File
@@ -64,6 +64,7 @@ beforeEach(async () => {
global.window = windowRef;
global.document = documentRef;
global.HTMLElement = windowRef.HTMLElement;
global.HTMLStyleElement = windowRef.HTMLStyleElement;
global.Element = windowRef.Element;
global.Node = windowRef.Node;
global.getComputedStyle = windowRef.getComputedStyle.bind(windowRef);
@@ -103,6 +104,7 @@ afterEach(() => {
delete global.window;
delete global.document;
delete global.HTMLElement;
delete global.HTMLStyleElement;
delete global.Element;
delete global.Node;
delete global.getComputedStyle;
@@ -756,7 +758,7 @@ test("applies token-based sizing and arrow positioning", async () => {
assert.equal(panelStyles.getPropertyValue("--popover-max-height").trim(), "240px");
assert.equal(arrow.dataset.popoverArrowSide, "bottom");
const arrowStyles = getComputedStyle(arrow);
assert.notEqual(arrowStyles.top, "");
assert.notEqual(arrowStyles.getPropertyValue("--popover-arrow-top").trim(), "auto");
popover.destroy();
});