The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 03:37 UTC
| 1 | import * as Schema from "effect/Schema"; |
| 2 | import { describe, expect, it } from "vite-plus/test"; |
| 3 | |
| 4 | import { GuestRedeemRequest } from "./guestShare.ts"; |
| 5 | |
| 6 | const isRedeem = Schema.is(GuestRedeemRequest); |
| 7 | |
| 8 | describe("GuestRedeemRequest", () => { |
| 9 | it("accepts a one-line name and rejects names that break the attribution line", () => { |
| 10 | expect(isRedeem({ credential: "invite", name: "Maya Chen" })).toBe(true); |
| 11 | for (const name of [ |
| 12 | "Maya\nowner", |
| 13 | "Maya owner", |
| 14 | "Maya owner", |
| 15 | "Maya\u0007", |
| 16 | "Theo\u202E (owner)", |
| 17 | "Theo\u2066x", |
| 18 | ]) { |
| 19 | expect(isRedeem({ credential: "invite", name })).toBe(false); |
| 20 | } |
| 21 | }); |
| 22 | }); |