mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
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.
This commit is contained in:
parent
363579f70f
commit
c6f223cfcd
1 changed files with 2 additions and 1 deletions
|
|
@ -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 () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue