]> git.r.bdr.sh - rbdr/forum/blob - src/components/glyph/glyph.test.js
Update sveltekit version
[rbdr/forum] / src / components / glyph / glyph.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 Glyph from './glyph.svelte';
7
8 const internals = {
9 results: null
10 };
11
12 describe('Glyph component', () => {
13
14 beforeEach(() => {
15
16 internals.results = render(Glyph, { props: {
17 uuid: '9fb14ebc-bc64-400b-915f-d429ec44b8fe'
18 } });
19 });
20
21 test('Should act as an image', () => {
22
23 expect(internals.results.getByRole('img'))
24 .toBeVisible();
25 });
26
27 test('Should render 4 glyphs', () => {
28
29 expect(internals.results.getByRole('img'))
30 .toHaveTextContent(/^. . . .$/);
31 });
32 });