mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
Tests
This commit is contained in:
parent
0ee924f91e
commit
8e3eb33165
1 changed files with 28 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
import { describe, it, expect, vi } from "vitest";
|
||||
import { render, screen } from "@testing-library/react";
|
||||
import VectorStoreForm from "./VectorStoreForm";
|
||||
import * as networking from "../networking";
|
||||
import { CredentialItem } from "../networking";
|
||||
|
||||
vi.mock("../networking");
|
||||
|
||||
describe("VectorStoreForm", () => {
|
||||
it("should render the form when visible", () => {
|
||||
const mockOnCancel = vi.fn();
|
||||
const mockOnSuccess = vi.fn();
|
||||
const mockAccessToken = "test-token";
|
||||
const mockCredentials: CredentialItem[] = [];
|
||||
|
||||
render(
|
||||
<VectorStoreForm
|
||||
isVisible={true}
|
||||
onCancel={mockOnCancel}
|
||||
onSuccess={mockOnSuccess}
|
||||
accessToken={mockAccessToken}
|
||||
credentials={mockCredentials}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(screen.getByText("Add New Vector Store")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue