]> git.r.bdr.sh - rbdr/forum/blame_incremental - src/components/glyph/glyph.test.js
Add gitlab CI config
[rbdr/forum] / src / components / glyph / glyph.test.js
... / ...
CommitLineData
1import '@testing-library/jest-dom/extend-expect';
2
3import { render } from '@testing-library/svelte';
4import '$/config/i18n';
5
6import Glyph from './glyph.svelte';
7
8const internals = {
9 results: null
10};
11
12describe('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});