mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
Merge b3aa78da27 into 49affa7c01
This commit is contained in:
commit
ff73783095
2 changed files with 28 additions and 0 deletions
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
28
ui/litellm-dashboard/src/app/layout.test.tsx
Normal file
28
ui/litellm-dashboard/src/app/layout.test.tsx
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
vi.mock("./globals.css", () => ({}));
|
||||
vi.mock("next/font/google", () => ({
|
||||
Inter: () => ({ className: "inter" }),
|
||||
}));
|
||||
|
||||
const { metadata } = await import("./layout");
|
||||
|
||||
const appDir = path.dirname(new URL(import.meta.url).pathname);
|
||||
const dashboardDir = path.resolve(appDir, "..", "..");
|
||||
|
||||
describe("root layout favicon", () => {
|
||||
it("points the only declared icon at the proxy's /get_favicon endpoint", () => {
|
||||
expect(metadata.icons).toEqual({ icon: "/get_favicon" });
|
||||
});
|
||||
|
||||
it("keeps favicon.ico out of the app directory so Next does not emit a competing icon link", () => {
|
||||
expect(fs.existsSync(path.join(appDir, "favicon.ico"))).toBe(false);
|
||||
});
|
||||
|
||||
it("ships the default favicon as a public asset so the exported build still serves favicon.ico", () => {
|
||||
expect(fs.existsSync(path.join(dashboardDir, "public", "favicon.ico"))).toBe(true);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue