diff --git a/src/ui/link/test.tsx b/src/ui/link/test.tsx index e91555e1..e3ab693c 100644 --- a/src/ui/link/test.tsx +++ b/src/ui/link/test.tsx @@ -60,6 +60,14 @@ describe('', () => { 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,