]>
git.r.bdr.sh - rbdr/forum/blob - src/components/header/header.test.js
7d57265f86f4da38ef66b1325ca4a5c7aa404e81
1 import '@testing-library/jest-dom/extend-expect';
3 import { render
} from '@testing-library/svelte';
4 import '$/config/i18n';
5 import { enableTopicActions
} from '$/stores/actions';
7 import Header
from './header.svelte';
9 describe('Header component', () => {
11 test('Should not display topic if action is not set', () => {
13 const results
= render(Header
);
15 expect(results
.queryByTitle('Reply'))
19 test('Should display topic if action is set', () => {
21 enableTopicActions('d138d6d8-e669-42e7-995d-20a7fcc176f5');
22 const results
= render(Header
);
24 expect(results
.getByTitle('Reply'))