code: tsx,nextjs,navlink (1 files)

This commit is contained in:
Richard Ward
2025-12-30 18:07:41 +00:00
parent 43bde59cda
commit cd3255a94e

View File

@@ -63,15 +63,16 @@ describe('NavLink', () => {
)
const link = screen.getByText('Home').closest('a')
// Check for active styling - MUI applies specific classes
// Check for active styling - fakemui applies CSS module classes
expect(link).toBeTruthy()
expect(link?.className).toMatch(/navLinkActive/)
})
it('does not have underline by default', () => {
render(<NavLink href="/home">Home</NavLink>)
const link = screen.getByText('Home').closest('a')
// MUI Link with underline="none" doesn't add text-decoration
// fakemui Link with underline="none" doesn't add text-decoration
expect(link).toBeTruthy()
})
})