From a724b4b38bacc631410627395b0d1190a0e8de0d Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 4 Oct 2023 18:16:55 +0200
Subject: feat(components): add a VisuallyHidden component

---
 .../atoms/visually-hidden/visually-hidden.test.tsx          | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 src/components/atoms/visually-hidden/visually-hidden.test.tsx

(limited to 'src/components/atoms/visually-hidden/visually-hidden.test.tsx')

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();
+  });
+});
-- 
cgit v1.2.3

