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, 04:45 UTC
| 1 | import { describe, expect, it } from "vite-plus/test"; |
| 2 | |
| 3 | import { resolveProjectThreadCreationBranch } from "./projectThreadCreationValidation"; |
| 4 | |
| 5 | describe("resolveProjectThreadCreationBranch", () => { |
| 6 | it("uses the live checkout for an untouched local draft label and recorded branch", () => { |
| 7 | expect( |
| 8 | resolveProjectThreadCreationBranch({ |
| 9 | workspaceMode: "local", |
| 10 | selectedBranch: null, |
| 11 | currentCheckoutBranch: "feature/x", |
| 12 | }), |
| 13 | ).toBe("feature/x"); |
| 14 | }); |
| 15 | |
| 16 | it("never borrows the current checkout for a worktree draft", () => { |
| 17 | expect( |
| 18 | resolveProjectThreadCreationBranch({ |
| 19 | workspaceMode: "worktree", |
| 20 | selectedBranch: null, |
| 21 | currentCheckoutBranch: "feature/x", |
| 22 | }), |
| 23 | ).toBeNull(); |
| 24 | }); |
| 25 | }); |