diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-09-27 18:43:25 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-10-24 12:25:00 +0200 |
| commit | d17d894f398650209c0ddd29502308de8c07bd93 (patch) | |
| tree | 858402dfd362e74686d25fec155f247ad3217635 /src/components/molecules/nav/nav.test.tsx | |
| parent | 7255d25f6834a208c0ed44636356cc260f6ab6ba (diff) | |
feat(components): add Article, Aside, Footer, Header, Main & Nav
Some components have been renamed to be able to create Footer, Header
and Nav.
Diffstat (limited to 'src/components/molecules/nav/nav.test.tsx')
| -rw-r--r-- | src/components/molecules/nav/nav.test.tsx | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/components/molecules/nav/nav.test.tsx b/src/components/molecules/nav/nav.test.tsx deleted file mode 100644 index 2a6dc84..0000000 --- a/src/components/molecules/nav/nav.test.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { describe, expect, it } from '@jest/globals'; -import { render, screen } from '../../../../tests/utils'; -import { Envelop, Home } from '../../atoms'; -import { Nav, type NavItem } from './nav'; - -const navItems: NavItem[] = [ - { id: 'homeLink', href: '/', label: 'Home', logo: <Home /> }, - { id: 'contactLink', href: '/contact', label: 'Contact', logo: <Envelop /> }, -]; - -describe('Nav', () => { - it('renders a main navigation', () => { - render(<Nav kind="main" items={navItems} />); - expect(screen.getByRole('navigation')).toHaveClass('nav--main'); - }); - - it('renders a footer navigation', () => { - render(<Nav kind="footer" items={navItems} />); - expect(screen.getByRole('navigation')).toHaveClass('nav--footer'); - }); - - it('renders navigation links', () => { - render(<Nav kind="main" items={navItems} />); - expect( - screen.getByRole('link', { name: navItems[0].label }) - ).toHaveAttribute('href', navItems[0].href); - }); -}); |
