15 lines
408 B
TypeScript
15 lines
408 B
TypeScript
import { isUuid } from './string.utils';
|
|
|
|
describe('String Utils', () => {
|
|
describe('isUuid', () => {
|
|
it('should return true for valid UUID v4', () => {
|
|
expect(isUuid('550e8400-e29b-41d4-a716-446655440000')).toBe(true);
|
|
});
|
|
|
|
it('should return false for invalid strings', () => {
|
|
expect(isUuid('not-a-uuid')).toBe(false);
|
|
expect(isUuid('12345')).toBe(false);
|
|
});
|
|
});
|
|
});
|