feat(spf): HLS engine composition walkthrough + doc-driven cleanups (#1512)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Pillsbury
2026-05-05 12:07:26 -07:00
committed by GitHub
co-authored by Claude Opus 4.7
parent 17d44a5d32
commit 0cfd3bb395
103 changed files with 2509 additions and 1277 deletions
@@ -0,0 +1,44 @@
import { describe, expect, it } from 'vitest';
import { generateId } from '../generate-id';
describe('generateId', () => {
it('generates a string ID', () => {
const id = generateId();
expect(typeof id).toBe('string');
});
it('generates unique IDs', () => {
const id1 = generateId();
const id2 = generateId();
const id3 = generateId();
expect(id1).not.toBe(id2);
expect(id2).not.toBe(id3);
expect(id1).not.toBe(id3);
});
it('generates IDs without decimals', () => {
const id = generateId();
expect(id).not.toMatch(/\./);
});
it('generates IDs in consistent format', () => {
const id = generateId();
// Should be timestamp-random format
expect(id).toMatch(/^\d+-\d+$/);
});
it('generates different IDs in rapid succession', () => {
const ids = new Set<string>();
for (let i = 0; i < 100; i++) {
ids.add(generateId());
}
// All should be unique
expect(ids.size).toBe(100);
});
});