| 1 | import { describe, expect, it } from 'vitest'; |
| 2 | |
| 3 | import { bytesToUlid, createUlid |
| 4 | |
| 5 | describe('ulid', () |
| 6 | it('round-trips through its 16-byte form', |
| 7 | const ulid = |
| 8 | |
| 9 | expect(ulid).toHaveLength |
| 10 | expect(ulidToBytes(ulid |
| 11 | expect(bytesToUlid(ulidToBytes |
| 12 | }); |
| 13 | |
| 14 | it('sorts lexicographically by creation time', |
| 15 | const earlier = |
| 16 | const later = |
| 17 | |
| 18 | expect(earlier < |
| 19 | }); |
| 20 | |
| 21 | it('rejects malformed input', |
| 22 | expect(() => |
| 23 | expect(() => |
| 24 | }); |
| 25 | }); |