From 05ffd0b9b51df38d701d3507a6fad8653b0b19c4 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 24 Apr 2026 14:14:25 +0000 Subject: [PATCH] chore(ui): drop antd Modal.confirm mock for migrated policies/index test Co-authored-by: yuneng-jiang --- .../src/components/policies/index.test.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/ui/litellm-dashboard/src/components/policies/index.test.tsx b/ui/litellm-dashboard/src/components/policies/index.test.tsx index 3d7db6bd820..99a4348df8c 100644 --- a/ui/litellm-dashboard/src/components/policies/index.test.tsx +++ b/ui/litellm-dashboard/src/components/policies/index.test.tsx @@ -5,21 +5,6 @@ import { renderWithProviders } from "../../../tests/test-utils"; import { beforeEach, describe, expect, it, vi } from "vitest"; import PoliciesPanel from "./index"; -/** - * Ant Design's static Modal.confirm often does not run onOk in the real app (React 18+). - * In jsdom it may still run; we mock confirm as a no-op so the test fails until the panel - * uses a controlled DeleteResourceModal instead of Modal.confirm. - */ -vi.mock("antd", async (importOriginal) => { - const mod = await importOriginal(); - return { - ...mod, - Modal: Object.assign(mod.Modal, { - confirm: vi.fn(), - }), - }; -}); - const EXPECTED_ATTACHMENT_ID = "att-11111111-2222-3333-4444-555555555555" as const; const networkingMocks = vi.hoisted(() => ({