Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions frontend/jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import '@testing-library/jest-dom';
// reach for; stub them (inert) so component renders don't crash in tests.
if (typeof window !== 'undefined') {
if (typeof window.matchMedia !== 'function') {
window.matchMedia = (query) => ({
window.matchMedia = query => ({
matches: false,
media: query,
onchange: null,
Expand Down Expand Up @@ -43,8 +43,7 @@ class MockObserver {
}
}
if (typeof global.ResizeObserver === 'undefined') global.ResizeObserver = MockObserver;
if (typeof global.IntersectionObserver === 'undefined')
global.IntersectionObserver = MockObserver;
if (typeof global.IntersectionObserver === 'undefined') global.IntersectionObserver = MockObserver;

// Keep the original console.error
const originalConsoleError = console.error;
Expand Down
Loading