]>
Commit | Line | Data |
---|---|---|
a7cf03c1 RBR |
1 | /** |
2 | * @jest-environment jsdom | |
3 | */ | |
4 | ||
55fb920b RBR |
5 | import '@testing-library/jest-dom/extend-expect'; |
6 | ||
7 | import { render } from '@testing-library/svelte'; | |
a7cf03c1 | 8 | import '$lib/i18n'; |
55fb920b RBR |
9 | |
10 | import Topic from './topic.svelte'; | |
11 | ||
12 | const internals = { | |
13 | results: null | |
14 | }; | |
15 | ||
16 | describe('Topic Actions component', () => { | |
17 | ||
18 | test('Should link to reply page', () => { | |
19 | ||
20 | const results = render(Topic, { props: { | |
21 | actions: { | |
22 | id: '8ebaa211-fd9b-423a-8b4f-b57622007fde' | |
23 | } | |
24 | } }); | |
25 | ||
26 | expect(results.getByTitle('Reply').closest('a')) | |
27 | .toHaveAttribute('href', '/reply/8ebaa211-fd9b-423a-8b4f-b57622007fde'); | |
28 | }); | |
29 | }); |