From e29e145b053a5b1f338cef8a0721e185e955cdc2 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Mon, 4 Apr 2022 11:53:44 +0200
Subject: chore: add a Spinner component

---
 src/components/atoms/loaders/spinner.test.tsx | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 src/components/atoms/loaders/spinner.test.tsx

(limited to 'src/components/atoms/loaders/spinner.test.tsx')

diff --git a/src/components/atoms/loaders/spinner.test.tsx b/src/components/atoms/loaders/spinner.test.tsx
new file mode 100644
index 0000000..0a6db91
--- /dev/null
+++ b/src/components/atoms/loaders/spinner.test.tsx
@@ -0,0 +1,14 @@
+import { render, screen } from '@test-utils';
+import Spinner from './spinner';
+
+describe('Spinner', () => {
+  it('renders a spinner loader', () => {
+    render(<Spinner />);
+    expect(screen.getByText('Loading...')).toBeInTheDocument();
+  });
+
+  it('renders a spinner loader with a custom message', () => {
+    render(<Spinner message="Submitting" />);
+    expect(screen.getByText('Submitting')).toBeInTheDocument();
+  });
+});
-- 
cgit v1.2.3

