From 826b0ce3efcf87ae1d231e892db176f5e64b7b97 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 6 Apr 2022 23:50:10 +0200
Subject: chore: add a ThemeToggle component

---
 src/components/molecules/forms/theme-toggle.test.tsx | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 src/components/molecules/forms/theme-toggle.test.tsx

(limited to 'src/components/molecules/forms/theme-toggle.test.tsx')

diff --git a/src/components/molecules/forms/theme-toggle.test.tsx b/src/components/molecules/forms/theme-toggle.test.tsx
new file mode 100644
index 0000000..5cd3209
--- /dev/null
+++ b/src/components/molecules/forms/theme-toggle.test.tsx
@@ -0,0 +1,13 @@
+import { render, screen } from '@test-utils';
+import ThemeToggle from './theme-toggle';
+
+describe('ThemeToggle', () => {
+  it('renders a checked toggle (dark theme choice)', () => {
+    render(<ThemeToggle value={true} />);
+    expect(
+      screen.getByRole('checkbox', {
+        name: `Theme: Light theme Dark theme`,
+      })
+    ).toBeChecked();
+  });
+});
-- 
cgit v1.2.3

