13 lines · 606 B · TypeScript
RawDownload
import { describe, expect, it } from "vite-plus/test"; import { createPreviewAutomationClientId } from "./previewAutomationClientId"; describe("createPreviewAutomationClientId", () => {  it("creates bounded cryptographically random identities for independent host lifetimes", () => {    const clientIds = Array.from({ length: 32 }, createPreviewAutomationClientId);     expect(new Set(clientIds).size).toBe(clientIds.length);    expect(clientIds.every((clientId) => clientId.startsWith("preview-"))).toBe(true);    expect(clientIds.every((clientId) => clientId.length <= 128)).toBe(true);  });});

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t