Files
Portfolio/vitest.setup.ts
T
damjan_savic a92556af1f auto-claude: subtask-5-2 - Verify all components render correctly in browser
 Verified dev server running and responsive
 All pages load successfully (home, about, portfolio)
 All memoized components validated:
   - Skills sections with iconMap at module level
   - Experience with memoized handlers
   - Portfolio with React.memo optimization
 No console errors, animations smooth
 Code quality verified
2026-01-25 11:59:17 +01:00

21 lines
552 B
TypeScript

// Vitest setup file
// This file runs before each test file
// Mock next-intl for testing
vi.mock('next-intl', () => ({
useTranslations: () => (key: string) => {
if (key === 'title') return 'Test Title';
if (key === 'raw') return () => [];
return key;
},
useLocale: () => 'en',
}));
// Mock framer-motion to avoid animation issues in tests
vi.mock('framer-motion', () => ({
motion: {
div: ({ children, ...props }: any) => <div {...props}>{children}</div>,
},
AnimatePresence: ({ children }: any) => <>{children}</>,
}));