(base: string)
| 67 | const taken = (slugs: ReadonlyArray<string>) => async (slug: string) => slugs.includes(slug); |
| 68 | // `acme-corp` + "-" + 4 chars of the look-alike-free alphabet. |
| 69 | const discriminated = (base: string) => new RegExp(`^${base}-[a-z2-9]{4}$`); |
| 70 | |
| 71 | it("uses the clean derivation when free", async () => { |
| 72 | expect(await generateOrgSlug("Acme Corp", taken([]))).toBe("acme-corp"); |