```
Remove unused isValidHttpUrl function and related tests Remove commented-out model validation regex from constants ```
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user