]> git.r.bdr.sh - rbdr/forum/blame_incremental - src/lib/components/glyph/glyph.test.ts
Don't remember what this WIP was about
[rbdr/forum] / src / lib / components / glyph / glyph.test.ts
... / ...
CommitLineData
1/**
2 * @jest-environment jsdom
3 */
4
5import '@testing-library/jest-dom/extend-expect';
6
7import { render } from '@testing-library/svelte';
8import '$lib/i18n';
9
10import Glyph from './glyph.svelte';
11
12const internals = {
13 results: null
14};
15
16describe('Glyph component', () => {
17 beforeEach(() => {
18 internals.results = render(Glyph, {
19 props: {
20 uuid: '9fb14ebc-bc64-400b-915f-d429ec44b8fe'
21 }
22 });
23 });
24
25 test('Should act as an image', () => {
26 expect(internals.results.getByRole('img')).toBeVisible();
27 });
28
29 test('Should render 4 glyphs', () => {
30 expect(internals.results.getByRole('img')).toHaveTextContent(/^. . . .$/);
31 });
32});