Fix regex patterns in URL constants tests

Remove unnecessary escape characters in regex patterns to satisfy eslint no-useless-escape rule.
This commit is contained in:
bymyself
2025-07-18 14:14:01 -07:00
parent 5faf9e0105
commit 08daa6f3ef

View File

@@ -49,7 +49,7 @@ describe('URL Constants', () => {
describe('Mirror Configuration', () => {
it('should have valid mirror URLs', () => {
const urlPattern =
/^https?:\/\/[a-z0-9]+([-\.]{1}[a-z0-9]+)*\.[a-z]{2,}(:[0-9]{1,5})?(\/.*)?$/i
/^https?:\/\/[a-z0-9]+([-.][a-z0-9]+)*\.[a-z]{2,}(:[0-9]{1,5})?(\/.*)?$/i
expect(PYTHON_MIRROR.mirror).toMatch(urlPattern)
expect(PYTHON_MIRROR.fallbackMirror).toMatch(urlPattern)