We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9da3a10 commit 7c3fb02Copy full SHA for 7c3fb02
packages/svelte/tests/runtime-legacy/shared.ts
@@ -478,3 +478,13 @@ export function ok(value: any): asserts value {
478
throw new Error(`Expected truthy value, got ${value}`);
479
}
480
481
+
482
+// @ts-expect-error JS DOM doesn't support it
483
+Window.prototype.matchMedia = (media) => {
484
+ return {
485
+ matches: false,
486
+ media,
487
+ addEventListener: () => {},
488
+ removeEventListener: () => {}
489
+ };
490
+};
0 commit comments