fix: add displayName to MockLink in UserDropdown test

Fixes ESLint react/display-name error by adding displayName
property to the MockLink component in the jest mock.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
soufiane 2025-12-01 21:57:51 +01:00
parent 0dd11b572d
commit 79b579ae55

View File

@ -9,9 +9,11 @@ import { UserDropdown } from '@/components/UserDropdown';
// Mock next/link // Mock next/link
jest.mock('next/link', () => { jest.mock('next/link', () => {
return ({ children, href }: { children: React.ReactNode; href: string }) => ( const MockLink = ({ children, href }: { children: React.ReactNode; href: string }) => (
<a href={href}>{children}</a> <a href={href}>{children}</a>
); );
MockLink.displayName = 'MockLink';
return MockLink;
}); });
describe('UserDropdown', () => { describe('UserDropdown', () => {