Files
chess-project/jest.setup.ts
T
2025-12-04 10:30:28 +01:00

14 lines
398 B
TypeScript

import '@testing-library/jest-dom'
if (typeof window !== 'undefined') {
// Mock scrollIntoView for JSDOM
window.HTMLElement.prototype.scrollIntoView = jest.fn();
window.HTMLMediaElement.prototype.play = () => Promise.resolve();
}
// Mock react-markdown to avoid ESM issues in Jest
jest.mock('react-markdown', () => ({
__esModule: true,
default: (props: any) => props.children,
}));