The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { EnvironmentId } from "@t3tools/contracts"; |
| 2 | import { describe, expect, it } from "vite-plus/test"; |
| 3 | |
| 4 | import { shouldShowOpenInPicker } from "./OpenInPicker.logic"; |
| 5 | |
| 6 | describe("shouldShowOpenInPicker", () => { |
| 7 | it("shows both local environments when the primary has a separate WSL home", () => { |
| 8 | const primaryEnvironmentId = EnvironmentId.make("wsl"); |
| 9 | const hostEnvironmentId = EnvironmentId.make("host"); |
| 10 | for (const [activeThreadEnvironmentId, visible] of [ |
| 11 | [primaryEnvironmentId, true], |
| 12 | [hostEnvironmentId, true], |
| 13 | [EnvironmentId.make("other"), false], |
| 14 | ] as const) { |
| 15 | expect( |
| 16 | shouldShowOpenInPicker({ |
| 17 | activeProjectName: "Project", |
| 18 | activeThreadEnvironmentId, |
| 19 | primaryEnvironmentId, |
| 20 | hostEnvironmentId, |
| 21 | remoteOpenMode: "local-exec", |
| 22 | }), |
| 23 | ).toBe(visible); |
| 24 | } |
| 25 | }); |
| 26 | }); |