test(clone-modal): add smoke test for InputView

This commit is contained in:
2026-07-30 08:53:39 +08:00
parent 351370d6f0
commit 36367a58bc
@@ -0,0 +1,28 @@
import { describe, expect, it, vi } from "vitest"
import { render } from "@testing-library/react"
import InputView from "@/components/voice/clone-modal/InputView"
vi.mock("@ant-design/icons", () => ({
AudioOutlined: () => null,
UploadOutlined: () => null,
CheckOutlined: () => null,
CloseOutlined: () => null,
PlayCircleOutlined: () => null,
PauseCircleOutlined: () => null,
DeleteOutlined: () => null,
InfoCircleOutlined: () => null,
}))
vi.mock("antd", () => ({
Button: ({ children }: any) => null,
Input: () => null,
Progress: () => null,
message: { success: vi.fn(), error: vi.fn(), warning: vi.fn() },
}))
describe("InputView", () => {
it("renders without crashing", () => {
const { container } = render(<InputView />)
expect(container).toBeTruthy()
})
})