test(web): Link

This commit is contained in:
Paul Armstrong 2021-02-12 13:40:36 -08:00 committed by Blake Blackshear
parent 058c0affaf
commit 9c7e3177a2

View File

@ -0,0 +1,17 @@
import { h } from 'preact';
import Link from '../Link';
import { render, screen } from '@testing-library/preact';
describe('Link', () => {
test('renders a link', async () => {
render(<Link href="/tacos">Hello</Link>);
expect(screen.queryByText('Hello')).toMatchInlineSnapshot(`
<a
class="text-blue-500 hover:underline"
href="/tacos"
>
Hello
</a>
`);
});
});