react testing for links code example
Example: react testing for links
expect(screen.getByText('Click Me').closest('a')).toHaveAttribute('href', 'https://www.test.com/')
expect(screen.getByText('Click Me').closest('a')).toHaveAttribute('href', 'https://www.test.com/')