Add tests for LLM API endpoints

This commit is contained in:
stefan-kp
2025-12-04 10:30:28 +01:00
parent 32f93b9305
commit e01ece4161
3 changed files with 147 additions and 3 deletions
+5 -3
View File
@@ -1,8 +1,10 @@
import '@testing-library/jest-dom'
// Mock scrollIntoView for JSDOM
window.HTMLElement.prototype.scrollIntoView = jest.fn();
window.HTMLMediaElement.prototype.play = () => Promise.resolve();
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', () => ({