Skip to content

Commit

Permalink
Added back in missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderKaran committed Nov 22, 2023
1 parent 1dd1fba commit 6f9f227
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ui/link/test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ describe('<Link />', () => {
expect(anchor).toHaveAttribute('href', defaultProps.href);
});

it('should support the `to` prop', () => {
renderInRouter('my link', {
to: newPath,
});
const linkElement = screen.getByRole('link', { name: 'my link' });
expect(linkElement).toHaveAttribute('href', newPath);
});

it('should pass props to the child element', () => {
renderInRouter('my link', {
...defaultProps,
Expand Down

0 comments on commit 6f9f227

Please sign in to comment.