8 lines
385 B
TypeScript
8 lines
385 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { newUlid, parseUlid, ULID_PATTERN } from '../../src/core/ids.js';
|
|
|
|
describe('platform identifiers', () => {
|
|
it('generates canonical sortable ULIDs', () => expect(newUlid()).toMatch(ULID_PATTERN));
|
|
it('rejects UUID compatibility drift', () =>
|
|
expect(() => parseUlid('550e8400-e29b-41d4-a716-446655440000')).toThrow());
|
|
});
|