From c6fc98a8e6b701e7bba30212e405c4ec6cc114ea Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 29 Mar 2022 19:42:50 +0200
Subject: test(jest): add a test for Header component

---
 __tests__/jest/components/Header.test.tsx | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 __tests__/jest/components/Header.test.tsx

(limited to '__tests__/jest/components/Header.test.tsx')

diff --git a/__tests__/jest/components/Header.test.tsx b/__tests__/jest/components/Header.test.tsx
new file mode 100644
index 0000000..de85e95
--- /dev/null
+++ b/__tests__/jest/components/Header.test.tsx
@@ -0,0 +1,13 @@
+import Header from '@components/Header/Header';
+import { render } from '@test-utils';
+import '../__mocks__/matchMedia.mock';
+
+// Toolbar uses forwardRef. Without mocking an error occurred.
+jest.mock('@components/Toolbar/Toolbar', () => 'div');
+
+describe('Header', () => {
+  it('renders the Header component', () => {
+    const { container } = render(<Header isHome={false} />);
+    expect(container).toBeTruthy();
+  });
+});
-- 
cgit v1.2.3

