The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { describe, expect, it } from "vite-plus/test"; |
| 2 | |
| 3 | import { findProjectByPath } from "@t3tools/client-runtime/state/projects"; |
| 4 | |
| 5 | describe("projectPaths", () => { |
| 6 | it("finds existing projects even when the input formatting differs", () => { |
| 7 | const existing = findProjectByPath( |
| 8 | [ |
| 9 | { id: "project-1", cwd: "/repo/app" }, |
| 10 | { id: "project-2", cwd: "C:\\Work\\Repo" }, |
| 11 | ], |
| 12 | "C:/Work/Repo/", |
| 13 | ); |
| 14 | |
| 15 | expect(existing?.id).toBe("project-2"); |
| 16 | }); |
| 17 | }); |