Skip to content

Commit 6cb9cf6

Browse files
committed
✅ feat: Add new landing page unit test
Check if the initial landing page shows 'login' and 'register' link buttons.
1 parent 42a6b15 commit 6cb9cf6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import Home from '@/app/page';
44

55
it('renders main page with the text "Get started by editing"', () => {
66
render(<Home />);
7-
const text = screen.getByText(/Get started by editing/i);
8-
expect(text).toBeInTheDocument();
7+
const login = screen.getAllByText(/\bLogin\b/i).length;
8+
expect(login).toBe(2);
9+
10+
const register = screen.getAllByText(/\bRegister\b/i).length;
11+
expect(register).toBe(2);
912
});

0 commit comments

Comments
 (0)