Something went wrong. Try again.
Find the cast and crew shared by two movies or TV shows crosscredit.haltcase.dev
Something went wrong. Try again.
1234567891011121314151617181920212223242526import { describe, expect, it } from "vite-plus/test";
import { previewName } from "../../scripts/deployment.ts";
describe("native preview identity", () => { it("keeps similarly spelled source branches distinct and names stable and URL-safe", () => { const names = ["feature/search", "feature-search", "Feature/search", "🎬", "a".repeat(200)].map( (branch) => previewName(branch) );
expect(new Set(names).size).toBe(names.length);
for (const name of names) { expect(name).toMatch(/^pr-[a-z0-9-]+-[a-f0-9]{12}$/); expect(name.length).toBeLessThanOrEqual(63); }
expect(previewName("feature/search")).toBe(previewName("feature/search")); });
it("refuses main and missing source branches", () => { expect(() => previewName("main")).toThrow(); expect(() => previewName("")).toThrow(); });});