]> git.r.bdr.sh - rbdr/forum/blob - src/components/actions/topic.test.js
Add tests for actions + pacts for graphql errrors
[rbdr/forum] / src / components / actions / topic.test.js
1 import '@testing-library/jest-dom/extend-expect';
2
3 import { render } from '@testing-library/svelte';
4 import '$/config/i18n';
5
6 import Topic from './topic.svelte';
7
8 const internals = {
9 results: null
10 };
11
12 describe('Topic Actions component', () => {
13
14 test('Should link to reply page', () => {
15
16 const results = render(Topic, { props: {
17 actions: {
18 id: '8ebaa211-fd9b-423a-8b4f-b57622007fde'
19 }
20 } });
21
22 expect(results.getByTitle('Reply').closest('a'))
23 .toHaveAttribute('href', '/reply/8ebaa211-fd9b-423a-8b4f-b57622007fde');
24 });
25 });