aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/layout/site-footer.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-footer.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-footer.test.tsx')
-rw-r--r--src/components/organisms/layout/site-footer.test.tsx38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/components/organisms/layout/site-footer.test.tsx b/src/components/organisms/layout/site-footer.test.tsx
deleted file mode 100644
index 3ad4022..0000000
--- a/src/components/organisms/layout/site-footer.test.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { describe, expect, it } from '@jest/globals';
-import { render, screen as rtlScreen } from '../../../../tests/utils';
-import { SiteFooter, type SiteFooterProps } from './site-footer';
-
-const copyright: SiteFooterProps['copyright'] = {
- from: '2017',
- owner: 'Lorem ipsum',
-};
-
-const navItems = [
- { id: 'legal-notice', href: '#', label: 'Legal notice' },
-] satisfies SiteFooterProps['navItems'];
-
-describe('SiteFooter', () => {
- it('renders the website copyright', () => {
- render(<SiteFooter copyright={copyright} topId="top" />);
- expect(
- rtlScreen.getByText(new RegExp(copyright.owner))
- ).toBeInTheDocument();
- expect(rtlScreen.getByText(new RegExp(copyright.from))).toBeInTheDocument();
- });
-
- it('renders a back to top link', () => {
- render(<SiteFooter copyright={copyright} topId="top" />);
- expect(
- rtlScreen.getByRole('link', { name: 'Back to top' })
- ).toBeInTheDocument();
- });
-
- it('renders some nav items', () => {
- render(
- <SiteFooter copyright={copyright} navItems={navItems} topId="top" />
- );
- expect(
- rtlScreen.getByRole('link', { name: navItems[0].label })
- ).toBeInTheDocument();
- });
-});