From f478f906b65d1d04f5525b164d94db83ff59d573 Mon Sep 17 00:00:00 2001 From: Johnson Mao Date: Tue, 7 Nov 2023 23:25:45 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20update=20menu=20component=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/[lang]/__tests__/menu.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/[lang]/__tests__/menu.test.tsx b/src/app/[lang]/__tests__/menu.test.tsx index 2663324..8e7c0a1 100644 --- a/src/app/[lang]/__tests__/menu.test.tsx +++ b/src/app/[lang]/__tests__/menu.test.tsx @@ -9,7 +9,7 @@ describe('Menu component', () => { ]; it('should render correct element', () => { - mockPathname.mockReturnValueOnce('/'); + mockPathname.mockReturnValue('/'); render(); @@ -36,12 +36,12 @@ describe('Menu component', () => { ])( 'should render correct active link based on the pathname "%s"', (pathname, activeLinkText) => { - mockPathname.mockReturnValueOnce(pathname); + mockPathname.mockReturnValue(pathname); render(); const links = screen.getAllByRole('link'); - const activeClassName = 'text-primary-500'; + const activeClassName = 'neon-text'; links.forEach((link) => { if (link.textContent === activeLinkText) {