diff --git a/ui/components/component-library/button-base/button-base.js b/ui/components/component-library/button-base/button-base.js index 426b65a31..ed701d9db 100644 --- a/ui/components/component-library/button-base/button-base.js +++ b/ui/components/component-library/button-base/button-base.js @@ -35,6 +35,7 @@ export const ButtonBase = ({ return ( { expect(anchor).toBe(1); }); - it('should render anchor element correctly by href only being passed', () => { + it('should render anchor element correctly by href only being passed and href exists', () => { const { getByTestId, container } = render( - , + + Button Base + , ); expect(getByTestId('button-base')).toHaveClass('mm-button'); + expect(getByTestId('button-base')).toHaveAttribute( + 'href', + 'https://www.test.com/', + ); const anchor = container.getElementsByTagName('a').length; expect(anchor).toBe(1); });