Dashboard › craft › Distillation
9d64c6c3-f25b-4c3b-a996-d31a91f3c9fd["lore_tm_v1_3yCPXM6dDxWzz9_XioIcLZVyNKbSW4h_SxxoK-t7v_I"]
Date: Sep 8, 2026
src/publish/__tests__/discover-location.js imports afterEach, expect, test, and vi from "vitest" and requires { discoverLocation, getWorkspaceNames } from "../discover-location.js"; afterEach() calls vi.restoreAllMocks().src/publish/__tests__/discover-location.js test "retains checkout-path behavior when the root config is absent" calls discoverLocation({ input: { path: "./packages/cli" }, repositoryDirectory: "__repo__", exists: () => false }) and expects { path: "./packages/cli" }.src/publish/__tests__/discover-location.js test "discovers exact workspace paths using the released Craft image" mocks execFile as vi.fn(() => '["packages/CLI"]'), calls discoverLocation() with input.path: "./packages/CLI", repositoryDirectory: "__repo__", and exists: () => true, and expects { path: ".", workspace: "packages/CLI" }.execFile was called with "docker", arguments containing "getsentry/craft:latest", "workspace", and "list", plus { encoding: "utf8" }.src/publish/__tests__/discover-location.js test "fails closed when Craft returns an invalid workspace list" mocks execFile as vi.fn(() => "{}"); getWorkspaceNames({ repositoryDirectory: "__repo__", exists: () => true, execFile }) must throw Craft workspace discovery returned an invalid workspace list..