Open History to see the last commit
1import { EnvironmentId } from "@t3tools/contracts";
2import { describe, expect, it } from "vite-plus/test";
3
4import { shouldShowOpenInPicker } from "./OpenInPicker.logic";
5
6describe("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});