2 * @jest-environment jsdom
5 import '@testing-library/jest-dom/extend-expect';
7 import { render } from '@testing-library/svelte';
9 import { enableTopicActions } from '$lib/stores/actions';
11 jest.mock('$lib/config/config.ts');
13 import Header from './header.svelte';
15 describe('Header component', () => {
17 test('Should not display topic if action is not set', () => {
19 const results = render(Header);
21 expect(results.queryByTitle('Reply'))
25 test('Should display topic if action is set', () => {
27 enableTopicActions('d138d6d8-e669-42e7-995d-20a7fcc176f5');
28 const results = render(Header);
30 expect(results.getByTitle('Reply'))