mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
Fixing tests
This commit is contained in:
parent
f9bdc20be2
commit
de9802578b
1 changed files with 3 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { render, screen, waitFor } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import Fallbacks from "./fallbacks";
|
||||
import Fallbacks from "./Fallbacks";
|
||||
import * as networkingModule from "../../../networking";
|
||||
import * as fetchModelsModule from "../../../playground/llm_calls/fetch_models";
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ describe("Fallbacks", () => {
|
|||
return buttons[buttons.length - 1];
|
||||
}
|
||||
const clickableElements = lastCell.querySelectorAll("[class*='cursor-pointer'], button");
|
||||
return Array.from(clickableElements).find((el) =>
|
||||
return Array.from(clickableElements).find((el) =>
|
||||
el.className.includes("red") || el.className.includes("hover:text-red")
|
||||
) || clickableElements[clickableElements.length - 1];
|
||||
};
|
||||
|
|
@ -202,7 +202,7 @@ describe("Fallbacks", () => {
|
|||
|
||||
await waitFor(() => {
|
||||
expect(networkingModule.setCallbacksCall).toHaveBeenCalled();
|
||||
const callArgs = networkingModule.setCallbacksCall.mock.calls[0];
|
||||
const callArgs = (networkingModule.setCallbacksCall as any).mock.calls[0];
|
||||
expect(callArgs[0]).toBe(mockAccessToken);
|
||||
expect(callArgs[1].router_settings.fallbacks).toHaveLength(1);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue