Skip to content

Commit

Permalink
test(web): Link
Browse files Browse the repository at this point in the history
  • Loading branch information
paularmstrong authored and blakeblackshear committed Feb 20, 2021
1 parent 058c0af commit 9c7e317
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions web/src/components/__tests__/Link.test.jsx
Original file line number Diff line number Diff line change
@@ -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>
`);
});
});

0 comments on commit 9c7e317

Please sign in to comment.