From d7d453f7333def28007b94b9c9d872f89224fc91 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Thu, 31 Mar 2022 14:25:12 +0200
Subject: chore: add a button component

---
 src/components/atoms/buttons/button.test.tsx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 src/components/atoms/buttons/button.test.tsx

(limited to 'src/components/atoms/buttons/button.test.tsx')

diff --git a/src/components/atoms/buttons/button.test.tsx b/src/components/atoms/buttons/button.test.tsx
new file mode 100644
index 0000000..57c79c6
--- /dev/null
+++ b/src/components/atoms/buttons/button.test.tsx
@@ -0,0 +1,18 @@
+import { render, screen } from '@test-utils';
+import Button from './button';
+
+describe('Button', () => {
+  it('renders the Button component', () => {
+    render(<Button onClick={() => null}>Button</Button>);
+    expect(screen.getByRole('button')).toBeInTheDocument();
+  });
+
+  it('renders the Button component with disabled state', () => {
+    render(
+      <Button onClick={() => null} disabled={true}>
+        Disabled Button
+      </Button>
+    );
+    expect(screen.getByRole('button')).toBeDisabled();
+  });
+});
-- 
cgit v1.2.3

