mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-16 23:41:43 +00:00
test(ui): preserve guardrail helper exports in panel mock
This commit is contained in:
parent
4ba3b4fcb3
commit
41bf11a930
1 changed files with 10 additions and 6 deletions
|
|
@ -48,12 +48,16 @@ vi.mock("@/utils/roles", () => ({
|
|||
isAdminRole: vi.fn((role: string) => role === "admin"),
|
||||
}));
|
||||
|
||||
vi.mock("./guardrail_info_helpers", () => ({
|
||||
getGuardrailLogoAndName: vi.fn(() => ({
|
||||
logo: null,
|
||||
displayName: "Test Provider",
|
||||
})),
|
||||
}));
|
||||
vi.mock("./guardrail_info_helpers", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("./guardrail_info_helpers")>();
|
||||
return {
|
||||
...actual,
|
||||
getGuardrailLogoAndName: vi.fn(() => ({
|
||||
logo: null,
|
||||
displayName: "Test Provider",
|
||||
})),
|
||||
};
|
||||
});
|
||||
|
||||
beforeAll(() => {
|
||||
Object.defineProperty(window, "matchMedia", {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue