aboutsummaryrefslogtreecommitdiffstats
path: root/__tests__
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-03-29 19:42:50 +0200
committerArmand Philippot <git@armandphilippot.com>2022-03-29 19:42:50 +0200
commitc6fc98a8e6b701e7bba30212e405c4ec6cc114ea (patch)
tree40628e8837f95b7401cddd13903a491eb8346022 /__tests__
parent6fee897c23b87228a31879a22fc778dec1c0bb92 (diff)
test(jest): add a test for Header component
Diffstat (limited to '__tests__')
-rw-r--r--__tests__/jest/components/Header.test.tsx13
1 files changed, 13 insertions, 0 deletions
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();
+ });
+});