Skip to content

Commit ad72dc1

Browse files
committed
test(ci): add Vitest smoke test for Logo link and run in GitHub Actions
1 parent 9e3c112 commit ad72dc1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/__tests__/App.test.jsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import { render, screen } from '@testing-library/react';
22
import App from '../App';
33

4-
test('renders Home nav link without crashing', () => {
4+
test('renders first Logo nav link to root ("/")', () => {
55
render(<App />);
6-
expect(screen.getByRole('link', { name: /home/i })).toBeInTheDocument();
6+
7+
const logoLinks = screen.getAllByRole('link', { name: /logo/i });
8+
expect(logoLinks.length).toBeGreaterThan(0);
9+
10+
const firstLogo = logoLinks[0];
11+
expect(firstLogo).toBeInTheDocument();
12+
expect(firstLogo).toHaveAttribute('href', '/');
713
});

0 commit comments

Comments
 (0)