diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-10-04 18:16:55 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:14:41 +0100 |
| commit | a724b4b38bacc631410627395b0d1190a0e8de0d (patch) | |
| tree | 27bd2704fbaf2c3c7455e5cd424765df91db3d02 /src/components/atoms/visually-hidden/visually-hidden.test.tsx | |
| parent | 0e60743d140aff66eca6df712f653ee20f5d4ef3 (diff) | |
feat(components): add a VisuallyHidden component
Diffstat (limited to 'src/components/atoms/visually-hidden/visually-hidden.test.tsx')
| -rw-r--r-- | src/components/atoms/visually-hidden/visually-hidden.test.tsx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/components/atoms/visually-hidden/visually-hidden.test.tsx b/src/components/atoms/visually-hidden/visually-hidden.test.tsx new file mode 100644 index 0000000..c5eb647 --- /dev/null +++ b/src/components/atoms/visually-hidden/visually-hidden.test.tsx @@ -0,0 +1,13 @@ +import { describe, expect, it } from '@jest/globals'; +import { render, screen as rtlScreen } from '@testing-library/react'; +import { VisuallyHidden } from './visually-hidden'; + +describe('VisuallyHidden', () => { + it('renders its body', () => { + const body = 'natus vero doloremque'; + + render(<VisuallyHidden>{body}</VisuallyHidden>); + + expect(rtlScreen.getByText(body)).toBeInTheDocument(); + }); +}); |
