mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
CreateTagModal test
This commit is contained in:
parent
2a0088261a
commit
e7d5840cd2
1 changed files with 16 additions and 1 deletions
|
|
@ -1,9 +1,24 @@
|
|||
import { describe, it, expect, vi, beforeEach } from "vitest";
|
||||
import { describe, it, expect, vi, beforeEach, beforeAll } from "vitest";
|
||||
import { render, screen, waitFor } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import CreateTagModal from "./CreateTagModal";
|
||||
|
||||
describe("CreateTagModal", () => {
|
||||
beforeAll(() => {
|
||||
Object.defineProperty(window, "matchMedia", {
|
||||
writable: true,
|
||||
value: vi.fn().mockImplementation((query) => ({
|
||||
matches: false,
|
||||
media: query,
|
||||
onchange: null,
|
||||
addListener: vi.fn(),
|
||||
removeListener: vi.fn(),
|
||||
addEventListener: vi.fn(),
|
||||
removeEventListener: vi.fn(),
|
||||
dispatchEvent: vi.fn(),
|
||||
})),
|
||||
});
|
||||
});
|
||||
const mockOnCancel = vi.fn();
|
||||
const mockOnSubmit = vi.fn();
|
||||
const mockAvailableModels = [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue