From c3d07b89bdeabb161d36a3e9e33068e13426b26f Mon Sep 17 00:00:00 2001 From: "Timo K." Date: Fri, 9 Oct 2026 11:08:03 +0200 Subject: [PATCH] review: unnecassary matchMedia overwrite on test start. --- src/Modal.test.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/Modal.test.tsx b/src/Modal.test.tsx index 1c67bd4da..223bbbc8d 100644 --- a/src/Modal.test.tsx +++ b/src/Modal.test.tsx @@ -73,14 +73,6 @@ test("the modal renders as a drawer in mobile viewports", () => { }); test("the modal can be closed by clicking the backdrop, in another window too", async () => { - // The drawer test above leaves a touchscreen matchMedia behind; this is - // about the desktop dialog - window.matchMedia = (): MediaQueryList => - ({ - matches: false, - addEventListener: (): void => {}, - removeEventListener: (): void => {}, - }) as unknown as MediaQueryList; // A dialog moved into another window, as a host does for a Document // Picture-in-Picture window: its nodes are not `Node`s of this window const frame = document.createElement("iframe");