Fixing up build errors

This commit is contained in:
Rishi Ghan
2026-04-14 12:51:29 -04:00
parent 91e99c50d9
commit 4e53f23e79
11 changed files with 115 additions and 37 deletions

25
jest.setup.cjs Normal file
View File

@@ -0,0 +1,25 @@
require('@testing-library/jest-dom');
// Mock window.matchMedia
Object.defineProperty(window, 'matchMedia', {
writable: true,
value: jest.fn().mockImplementation(query => ({
matches: false,
media: query,
onchange: null,
addListener: jest.fn(),
removeListener: jest.fn(),
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
dispatchEvent: jest.fn(),
})),
});
// Mock localStorage
const localStorageMock = {
getItem: jest.fn(),
setItem: jest.fn(),
removeItem: jest.fn(),
clear: jest.fn(),
};
global.localStorage = localStorageMock;