From c6f223cfcd979d049ca9f7a0651629a0e690b4bd Mon Sep 17 00:00:00 2001 From: ryan-crabbe-berri Date: Mon, 8 Jun 2026 14:06:04 -0700 Subject: [PATCH] test(ui): address review nits on playground migration Add the /ui/playground/ trailing-slash assertion for parity with the api-reference case, and rename the mapping test so its name covers the llm-playground entry it now also asserts. --- ui/litellm-dashboard/src/utils/migratedPages.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/utils/migratedPages.test.ts b/ui/litellm-dashboard/src/utils/migratedPages.test.ts index d614bf7dc6d..432b882b43d 100644 --- a/ui/litellm-dashboard/src/utils/migratedPages.test.ts +++ b/ui/litellm-dashboard/src/utils/migratedPages.test.ts @@ -28,7 +28,7 @@ describe("migratedHref / legacyPageHref", () => { expect(migratedHref("/api-reference")).toBe("/ui/api-reference"); }); - it("maps both the api_ref id and the hyphenated alias to the api-reference route", async () => { + it("maps legacy page ids (and the hyphenated api-reference alias) to their route segments", async () => { vi.doMock("@/components/networking", () => ({ serverRootPath: "/" })); const { MIGRATED_PAGES } = await import("./migratedPages"); @@ -51,6 +51,7 @@ describe("legacyKeyForPathname", () => { expect(legacyKeyForPathname("/ui/api-reference")).toBe("api_ref"); expect(legacyKeyForPathname("/ui/api-reference/")).toBe("api_ref"); expect(legacyKeyForPathname("/ui/playground")).toBe("llm-playground"); + expect(legacyKeyForPathname("/ui/playground/")).toBe("llm-playground"); }); it("returns null for a not-yet-migrated path", async () => {