import { describe, expect, it } from '@jest/globals'; import { render, screen as rtlScreen } from '@testing-library/react'; import { MetaItem } from './meta-item'; describe('MetaItem', () => { it('renders a label and a value', () => { const label = 'iusto'; const value = 'autem'; render(
); expect(rtlScreen.getByRole('term')).toHaveTextContent(label); expect(rtlScreen.getByRole('definition')).toHaveTextContent(value); }); it('can render a label with multiple values', () => { const label = 'iusto'; const values = [ { id: 'autem', value: 'autem' }, { id: 'quisquam', value: 'aut' }, { id: 'molestias', value: 'voluptatem' }, ]; render(
); expect(rtlScreen.getByRole('term')).toHaveTextContent(label); expect(rtlScreen.getAllByRole('definition')).toHaveLength(values.length); }); it('can render a centered group of label and values', () => { const label = 'iusto'; const value = 'autem'; render(
); expect(rtlScreen.getByRole('term').parentElement).toHaveClass( 'item--centered' ); }); it('can render an inlined group of label and values', () => { const label = 'iusto'; const value = 'autem'; render(
); expect(rtlScreen.getByRole('term').parentElement).toHaveClass( 'item--inlined' ); }); it('can render a group of label and bordered values', () => { const label = 'iusto'; const value = 'autem'; render(
); expect(rtlScreen.getByRole('term').parentElement).toHaveClass( 'item--bordered-values' ); }); it('can render a group of label and inlined values', () => { const label = 'iusto'; const value = 'autem'; render(
); expect(rtlScreen.getByRole('term').parentElement).toHaveClass( 'item--inlined-values' ); }); }); tion value='author'>author
path: root/public/prism/prism-nsis.min.js
blob: c85ecd14b5b308599c309f26e3d78a33b3920ce5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25