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 e4a0903 commit 6f33e54Copy full SHA for 6f33e54
packages/mobile-sdk-alpha/tests/setup.ts
@@ -26,3 +26,20 @@ if (typeof global !== 'undefined') {
26
console.log = originalConsole.log;
27
};
28
}
29
+
30
+// Mock window.matchMedia for Tamagui components
31
+if (typeof window !== 'undefined') {
32
+ Object.defineProperty(window, 'matchMedia', {
33
+ writable: true,
34
+ value: vi.fn().mockImplementation(query => ({
35
+ matches: false,
36
+ media: query,
37
+ onchange: null,
38
+ addListener: vi.fn(), // deprecated
39
+ removeListener: vi.fn(), // deprecated
40
+ addEventListener: vi.fn(),
41
+ removeEventListener: vi.fn(),
42
+ dispatchEvent: vi.fn(),
43
+ })),
44
+ });
45
+}
0 commit comments