📦 EqualifyEverything / equalify-dashboard

📄 header.test.tsx · 23 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23import { axe, toHaveNoViolations } from 'jest-axe';
import { describe, expect, it } from 'vitest';

import { Header } from '~/components/layout';
import { render, screen } from '../customRender';

expect.extend(toHaveNoViolations);

describe('Header Component', () => {
  it('renders all navigation links', () => {
    render(<Header />);
    ['Reports', 'Scans', 'Settings', 'My Account'].forEach((text) => {
      expect(screen.getByText(text)).toBeInTheDocument();
    });
  });

  it('is accessible', async () => {
    const { container } = render(<Header />);
    const results = await axe(container);
    expect(results).toHaveNoViolations();
  });
});