TypeScript
test(web): keep the preview profile label helper private (#9997)
Julius Marminge11cb88efc54c
diff --git a/apps/web/src/components/preview/PreviewView.test.tsx b/apps/web/src/components/preview/PreviewView.test.tsxindex bb20ee36237..9456daef72d 100644--- a/apps/web/src/components/preview/PreviewView.test.tsx+++ b/apps/web/src/components/preview/PreviewView.test.tsx@@ -251,7 +251,7 @@ vi.mock("./AgentBrowserCursor", () => ({ AgentBrowserCursor: () => null }));vi.mock("~/browser/BrowserSurfaceSlot", () => ({ BrowserSurfaceSlot: () => null }));vi.mock("./usePreviewSession", () => ({ usePreviewSession: vi.fn() }));-import { PreviewView, previewProfileName } from "./PreviewView";+import { PreviewView } from "./PreviewView";import { toastManager } from "~/components/ui/toast";import { previewRuntimeTabId } from "~/browser/previewRuntimeTabId";@@ -352,12 +352,6 @@ describe("PreviewView navigation", () => {mocks.recordVisitForThread.mockClear();});- it("labels a tab whose saved profile was removed", () => {- expect(previewProfileName(BUILT_IN_BROWSER_PROFILES, "profile-removed")).toBe(- "Removed profile",- );- });-it("does not rerender while loading time passes", async () => {vi.useFakeTimers();mocks.loading = true;diff --git a/apps/web/src/components/preview/PreviewView.tsx b/apps/web/src/components/preview/PreviewView.tsxindex 640690854e5..7e0bf2dfb54 100644--- a/apps/web/src/components/preview/PreviewView.tsx+++ b/apps/web/src/components/preview/PreviewView.tsx@@ -76,7 +76,7 @@ interface Props {) => void;}-export function previewProfileName(+function previewProfileName(profiles: ReadonlyArray<{ readonly id: string; readonly name: string }>,profileId: string,): string {