From 163f9dc0fe436b708de4e59999e87005c6685a0f Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 1 Apr 2022 17:11:25 +0200
Subject: chore: add a social link component

---
 src/components/atoms/links/social-link.test.tsx | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 src/components/atoms/links/social-link.test.tsx

(limited to 'src/components/atoms/links/social-link.test.tsx')

diff --git a/src/components/atoms/links/social-link.test.tsx b/src/components/atoms/links/social-link.test.tsx
new file mode 100644
index 0000000..f49fb5a
--- /dev/null
+++ b/src/components/atoms/links/social-link.test.tsx
@@ -0,0 +1,15 @@
+import { render, screen } from '@test-utils';
+import SocialLink from './social-link';
+
+/**
+ * Next.js mock images to use next/image component. So for now, I need to mock
+ * the svg files manually.
+ */
+jest.mock('@assets/images/social-media/github.svg', () => 'svg-file');
+
+describe('SocialLink', () => {
+  it('render a social link', () => {
+    render(<SocialLink name="Github" url="#" />);
+    expect(screen.getByRole('link')).toHaveAccessibleName('Github');
+  });
+});
-- 
cgit v1.2.3

