Remove unused isValidHttpUrl function and related tests

Remove commented-out model validation regex from constants
```
This commit is contained in:
2026-05-07 00:02:32 +02:00
parent cec8302dbe
commit 75fa07f148
4 changed files with 124 additions and 168 deletions
-18
View File
@@ -7,7 +7,6 @@ import {
validateModelName,
validatePluginSettings,
safeParseJson,
isValidHttpUrl,
} from '../src/utils';
describe('Validation Functions', () => {
@@ -185,23 +184,6 @@ describe('Validation Functions', () => {
expect(() => safeParseJson(123 as any)).toThrow('Input must be a string');
});
});
describe('isValidHttpUrl', () => {
it('should accept valid HTTP URLs', () => {
expect(isValidHttpUrl('http://localhost:11434')).toBe(true);
expect(isValidHttpUrl('https://example.com')).toBe(true);
});
it('should reject non-HTTP URLs', () => {
expect(isValidHttpUrl('ftp://example.com')).toBe(false);
expect(isValidHttpUrl('file:///path')).toBe(false);
});
it('should reject invalid URLs', () => {
expect(isValidHttpUrl('not-a-url')).toBe(false);
expect(isValidHttpUrl('')).toBe(false);
});
});
});
describe('Logger', () => {