import { render, screen } from '@testing-library/react'; import { describe, it, expect } from 'vitest'; import BrandLogo from '../BrandLogo'; describe('BrandLogo Component', () => { it('renders default text logo with brand name and subtitle', () => { render(); expect(screen.getByText('Canina')).toBeInTheDocument(); expect(screen.getByText('ایران')).toBeInTheDocument(); expect(screen.getByText('نماینده رسمی CANINA PHARMA GMBH GERMANY')).toBeInTheDocument(); }); it('renders wrapped with Link to given href', () => { const { container } = render(); const link = container.querySelector('a'); expect(link).toBeInTheDocument(); expect(link?.getAttribute('href')).toBe('/custom-url'); }); it('renders without link when href is empty string', () => { const { container } = render(); const link = container.querySelector('a'); expect(link).toBeNull(); }); });