diff --git a/frontend/src/components/HomeComponents/Footer/Footer.tsx b/frontend/src/components/HomeComponents/Footer/Footer.tsx index 4c136e9e..57885deb 100644 --- a/frontend/src/components/HomeComponents/Footer/Footer.tsx +++ b/frontend/src/components/HomeComponents/Footer/Footer.tsx @@ -2,6 +2,7 @@ import { HighlightLink } from '@/components/ui/link-highlight'; import logo from '../../../assets/logo.png'; import logoLight from '../../../assets/logo_light.png'; import { url } from '@/components/utils/URLs'; +import { handleLogoClick } from '@/components/utils/utils'; export const Footer = () => { return ( @@ -12,7 +13,8 @@ export const Footer = () => {
{ 'logo-path'); jest.mock('../../../../assets/logo_light.png', () => 'logo-light-path'); @@ -29,3 +30,21 @@ describe('Footer component using Snapshot', () => { expect(asFragment()).toMatchSnapshot(); }); }); + +describe('Footer logo click handler', () => { + test('should call handleLogoClick when logo link is clicked', () => { + const handleLogoClickSpy = jest.spyOn(utils, 'handleLogoClick'); + render(