review: unnecassary matchMedia overwrite on test start.

This commit is contained in:
Timo K.
2026-10-09 11:08:03 +02:00
parent 3bd892ebd3
commit c3d07b89bd
-8
View File
@@ -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 () => { 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 // 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 // Picture-in-Picture window: its nodes are not `Node`s of this window
const frame = document.createElement("iframe"); const frame = document.createElement("iframe");