49effedf61
- Add comprehensive test suite (20 tests) for tactic detection - Fix pawn detection threshold bug (200 -> 100 centipawns) - Add error handling to uciToSan for invalid moves - Integrate tactical data into Tutor component for real-time feedback - Pass missedTactics from ChessGame to Tutor via props - Update LLM prompt to explain missed tactical opportunities - Fix Jest configuration to handle react-markdown ESM issues - All 50 tests passing
12 lines
353 B
TypeScript
12 lines
353 B
TypeScript
import '@testing-library/jest-dom'
|
|
|
|
// 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,
|
|
}));
|