JEST Verifique o link de um botão

expect(screen.getByText('Click Me').closest('a')).toHaveAttribute('href', 'https://www.test.com/')
Clean Cheetah