From c6f6f8f895e68f2d85ca681997ef613d982bac14 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 20 Oct 2023 14:06:48 +0200
Subject: refactor(components): rewrite NavList component

* extract NavItem from NavList
* remove `kind` and `listClassName` props (since the consumer has
control over NavList, NavItem and NavLink components these props are
obsolete)
---
 src/components/molecules/nav/nav-list.test.tsx | 33 --------------------------
 1 file changed, 33 deletions(-)
 delete mode 100644 src/components/molecules/nav/nav-list.test.tsx

(limited to 'src/components/molecules/nav/nav-list.test.tsx')

diff --git a/src/components/molecules/nav/nav-list.test.tsx b/src/components/molecules/nav/nav-list.test.tsx
deleted file mode 100644
index 8524e22..0000000
--- a/src/components/molecules/nav/nav-list.test.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import { describe, expect, it } from '@jest/globals';
-import { render, screen as rtlScreen } from '../../../../tests/utils';
-import { Icon } from '../../atoms';
-import { NavList, type NavItem } from './nav-list';
-
-const navItems: NavItem[] = [
-  { id: 'homeLink', href: '/', label: 'Home', logo: <Icon shape="home" /> },
-  {
-    id: 'contactLink',
-    href: '/contact',
-    label: 'Contact',
-    logo: <Icon shape="envelop" />,
-  },
-];
-
-describe('Nav', () => {
-  it('renders a main navigation', () => {
-    render(<NavList kind="main" items={navItems} />);
-    expect(rtlScreen.getByRole('navigation')).toHaveClass('nav--main');
-  });
-
-  it('renders a footer navigation', () => {
-    render(<NavList kind="footer" items={navItems} />);
-    expect(rtlScreen.getByRole('navigation')).toHaveClass('nav--footer');
-  });
-
-  it('renders navigation links', () => {
-    render(<NavList kind="main" items={navItems} />);
-    expect(
-      rtlScreen.getByRole('link', { name: navItems[0].label })
-    ).toHaveAttribute('href', navItems[0].href);
-  });
-});
-- 
cgit v1.2.3

