test: tighten URL checks by parsing href host instead of substring checks

This commit is contained in:
CI
2025-11-29 03:24:31 +00:00
parent 7e5e3e4d38
commit 46eb444c97
2 changed files with 18 additions and 7 deletions

View File

@@ -122,7 +122,7 @@ describe('ProxyHosts progress apply', () => {
renderWithProviders(<ProxyHosts />)
await waitFor(() => expect(screen.getByText('One')).toBeTruthy())
const anchor = screen.getByRole('link', { name: /example.com/i })
const anchor = screen.getByRole('link', { name: /example\.com/i })
expect(anchor.getAttribute('target')).toBe('_self')
})
})