import { describe, it, expect } from 'vitest'; import { esExterno, propsEnlace } from '../enlaces'; describe('propsEnlace', () => { it('opens outside links in a new tab without handing over window.opener', () => { expect(propsEnlace('https://wa.me/525558185802')).toEqual({ target: '_blank', rel: 'noopener noreferrer' }); expect(propsEnlace('https://www.linkedin.com/in/x')).toEqual({ target: '_blank', rel: 'noopener noreferrer' }); }); it('leaves in-page anchors and mailto: in the same tab', () => { expect(propsEnlace('#contacto')).toEqual({}); expect(propsEnlace('mailto:hola@creeer.com')).toEqual({}); expect(esExterno('mailto:hola@creeer.com')).toBe(false); }); });