Skip to content

Commit

Permalink
✅ update menu component test
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnsonMao committed Nov 7, 2023
1 parent bcae558 commit f478f90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/[lang]/__tests__/menu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Menu component', () => {
];

it('should render correct element', () => {
mockPathname.mockReturnValueOnce('/');
mockPathname.mockReturnValue('/');

render(<Menu menu={menu} />);

Expand All @@ -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(<Menu menu={menu} />);

const links = screen.getAllByRole('link');
const activeClassName = 'text-primary-500';
const activeClassName = 'neon-text';

links.forEach((link) => {
if (link.textContent === activeLinkText) {
Expand Down

0 comments on commit f478f90

Please sign in to comment.