aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/layout/site-header.test.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-25 18:33:22 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:15:27 +0100
commit9aeb82269d7c74c4566b7ca254782a4dfbd69a6e (patch)
treee2ab930204cbcf20cebaa6125ea022f050d973af /src/components/organisms/layout/site-header.test.tsx
parentc21a137e1991af1331fe5768fc6bac15ea9230b1 (diff)
refactor(components): remove SiteHeader and SiteFooter components
They do not help to make the layout more readable (on the contrary I think...) so the props drilling is useless.
Diffstat (limited to 'src/components/organisms/layout/site-header.test.tsx')
-rw-r--r--src/components/organisms/layout/site-header.test.tsx59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/components/organisms/layout/site-header.test.tsx b/src/components/organisms/layout/site-header.test.tsx
deleted file mode 100644
index fa1b7be..0000000
--- a/src/components/organisms/layout/site-header.test.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-import { describe, expect, it } from '@jest/globals';
-import NextImage from 'next/image';
-import { render, screen as rtlScreen } from '../../../../tests/utils';
-import { SiteHeader } from './site-header';
-
-const nav = [
- { id: 'home-link', href: '#', label: 'Home' },
- { id: 'blog-link', href: '#', label: 'Blog' },
- { id: 'cv-link', href: '#', label: 'CV' },
- { id: 'contact-link', href: '#', label: 'Contact' },
-];
-
-const title = 'Assumenda quis quod';
-
-describe('SiteHeader', () => {
- it('renders the website title', () => {
- render(
- <SiteHeader
- ackeeStorageKey="ackee-tracking"
- logo={
- <NextImage
- alt="A logo"
- height={200}
- src="https://picsum.photos/200"
- width={200}
- />
- }
- motionStorageKey="reduced-motion"
- name={<h1>{title}</h1>}
- nav={nav}
- searchPage="#"
- />
- );
- expect(
- rtlScreen.getByRole('heading', { level: 1, name: title })
- ).toBeInTheDocument();
- });
-
- it('renders the main nav', () => {
- render(
- <SiteHeader
- ackeeStorageKey="ackee-tracking"
- logo={
- <NextImage
- alt="A photo"
- height={200}
- src="https://picsum.photos/200"
- width={200}
- />
- }
- motionStorageKey="reduced-motion"
- name={<div>{title}</div>}
- nav={nav}
- searchPage="#"
- />
- );
- expect(rtlScreen.getByRole('navigation')).toBeInTheDocument();
- });
-});