Open History to see the last commit
1import { describe, expect, it } from "@effect/vitest";
2import { projectCloneDisplayName } from "./projectClone.ts";
3
4describe("projectCloneDisplayName", () => {
5 const name = (destinationPath: string) =>
6 projectCloneDisplayName({ repository: null, destinationPath });
7
8 it("keeps literal backslashes in POSIX destination names", () => {
9 expect(name("/tmp/t3-clone/team\\repo")).toBe("team\\repo");
10 });
11
12 it("splits Windows drive and UNC paths on either separator", () => {
13 expect(name("C:\\Users\\dev\\repo")).toBe("repo");
14 expect(name("\\\\server\\share\\repo\\")).toBe("repo");
15 });
16});