import test from 'ava'; import {html} from 'htm/preact'; import {render} from 'preact-render-to-string'; import {PrivacyLink} from '../../source/index.js'; test('PrivacyLink', (t) => { t.snapshot(render(html`<${PrivacyLink} />`), 'Empty'); const attributes: Record = { href: 'https://example.org', }; t.snapshot( render(html`<${PrivacyLink} attributes=${attributes}>Example`), 'Text children', ); t.snapshot( render( html` <${PrivacyLink} attributes=${attributes}> Example with children `, ), 'HTML children', ); attributes.class = 'bold italic'; t.snapshot( render(html`<${PrivacyLink} attributes=${attributes}>Example`), 'CSS class', ); });