import { act, render, screen } from "@testing-library/react"; import { describe, expect, it, vi } from "vitest"; import WorkspaceFileEditor from "@/components/workspace/WorkspaceFileEditor"; import { workspaceApi } from "@/lib/api/workspace"; vi.mock("@/lib/api/workspace", () => ({ workspaceApi: { readFile: vi.fn(), writeFile: vi.fn() }, })); vi.mock("@/components/MarkdownEditor", () => ({ default: ({ value }: { value: string }) => (