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 { describe, expect, it } from "vite-plus/test"; |
| 2 | |
| 3 | import { secretRequestPageUrl } from "./secretRequest.ts"; |
| 4 | |
| 5 | describe("secretRequestPageUrl", () => { |
| 6 | it("opens only http and https pages", () => { |
| 7 | expect(secretRequestPageUrl("https://accounts.google.com/o/oauth2/auth?x=1")?.host).toBe( |
| 8 | "accounts.google.com", |
| 9 | ); |
| 10 | expect(secretRequestPageUrl("javascript:alert(1)")).toBeNull(); |
| 11 | expect(secretRequestPageUrl("https://?state=x")).toBeNull(); |
| 12 | expect(secretRequestPageUrl("not a url")).toBeNull(); |
| 13 | }); |
| 14 | }); |