import { render, screen } from '@testing-library/react'; import { describe, it, expect } from 'vitest'; import { Cierre } from '../Cierre'; describe('', () => { it('renders the closing quote', () => { render(); expect(screen.getByText(/Devuélvele claridad/i)).toBeInTheDocument(); }); it('renders 3 contact links with correct hrefs', () => { render(); const wa = screen.getByRole('link', { name: /whatsapp/i }); const mail = screen.getByRole('link', { name: /email/i }); const li = screen.getByRole('link', { name: /linkedin/i }); expect(wa.getAttribute('href')).toMatch(/^https:\/\/wa\.me\//); expect(mail.getAttribute('href')).toMatch(/^mailto:/); expect(li.getAttribute('href')).toMatch(/^https:\/\/(www\.)?linkedin\./); }); it('wraps contact links in a nav with aria-label="Contacto"', () => { render(); expect(screen.getByRole('navigation', { name: /contacto/i })).toBeInTheDocument(); }); });