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 { isSshRemoteUrl } from "./sourceControl.ts"; |
| 4 | |
| 5 | describe("isSshRemoteUrl", () => { |
| 6 | it.each([ |
| 7 | "git@github.com:owner/repo.git", |
| 8 | "ssh://git@github.com/owner/repo.git", |
| 9 | "github.com:owner/repo.git", |
| 10 | "github-work:owner/repo.git", |
| 11 | "gitserver:repo.git", |
| 12 | ])("reads %s as SSH", (remoteUrl) => { |
| 13 | expect(isSshRemoteUrl(remoteUrl)).toBe(true); |
| 14 | }); |
| 15 | |
| 16 | it.each([ |
| 17 | "https://github.com/owner/repo.git", |
| 18 | "C:/repos/repo", |
| 19 | "/srv/git/repo.git", |
| 20 | "./team:group/repo", |
| 21 | "file:///srv/git/repo.git", |
| 22 | "hg::owner/repo", |
| 23 | "C:repo.git", |
| 24 | ])("does not read %s as SSH", (remoteUrl) => { |
| 25 | expect(isSshRemoteUrl(remoteUrl)).toBe(false); |
| 26 | }); |
| 27 | }); |