Skip to content

Every analytics tool wants a subscription. And your data. I built Twiligent instead. YouTube stats. Instagram stats. One dashboard. Runs locally on your machine.

362 B
Raw Blame
import { mock } from 'node:test';

type Uuid = ReturnType<typeof crypto.randomUUID>;

// new rows get ids from crypto.randomUUID(); numbering them keeps responses and golden snapshots stable
export function mockRowIds(): void {
    let next = 0;
    mock.method(crypto, 'randomUUID', (): Uuid => `00000000-0000-4000-8000-${String(++next).padStart(12, '0')}`);
}