]> git.r.bdr.sh - rbdr/forum/blame_incremental - src/lib/components/actions/topic.test.ts
Don't remember what this WIP was about
[rbdr/forum] / src / lib / components / actions / topic.test.ts
... / ...
CommitLineData
1/**
2 * @jest-environment jsdom
3 */
4
5import '@testing-library/jest-dom/extend-expect';
6
7import { render } from '@testing-library/svelte';
8import '$lib/i18n';
9
10import Topic from './topic.svelte';
11
12describe('Topic Actions component', () => {
13 test('Should link to reply page', () => {
14 const results = render(Topic, {
15 props: {
16 actions: {
17 id: '8ebaa211-fd9b-423a-8b4f-b57622007fde'
18 }
19 }
20 });
21
22 expect(results.getByTitle('Reply').closest('a')).toHaveAttribute(
23 'href',
24 '/reply/8ebaa211-fd9b-423a-8b4f-b57622007fde'
25 );
26 });
27});