Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react testing for links

expect(screen.getByText('Click Me').closest('a')).toHaveAttribute('href', 'https://www.test.com/')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #testing #links
ADD COMMENT
Topic
Name
7+1 =