mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
Fix flaky tests
This commit is contained in:
parent
fb5429bfe7
commit
0d329826f1
1 changed files with 6 additions and 4 deletions
|
|
@ -168,16 +168,18 @@ describe("EntityUsage", () => {
|
|||
});
|
||||
|
||||
it("should render with organization entity type and call organization API", async () => {
|
||||
const { getByText, getAllByText } = render(<EntityUsage {...defaultProps} entityType="organization" />);
|
||||
render(<EntityUsage {...defaultProps} entityType="organization" />);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(mockOrganizationDailyActivityCall).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
expect(getByText("Organization Spend Overview")).toBeInTheDocument();
|
||||
expect(screen.getByText("Organization Spend Overview")).toBeInTheDocument();
|
||||
|
||||
const spendElements = getAllByText("$100.50");
|
||||
expect(spendElements.length).toBeGreaterThan(0);
|
||||
await waitFor(() => {
|
||||
const spendElements = screen.getAllByText("$100.50");
|
||||
expect(spendElements.length).toBeGreaterThan(0);
|
||||
});
|
||||
});
|
||||
|
||||
it("should switch between tabs", async () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue