// @vitest-environment jsdom import React from "react"; import { act } from "react"; import { createRoot } from "react-dom/client"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; // Minimal i18n stub vi.mock("next-intl", () => ({ useTranslations: () => (key: string) => key, })); // Monaco Editor stub — renders a simple textarea with data attributes vi.mock("@/shared/components/MonacoEditor", () => ({ default: ({ value, onChange, options, }: { value?: string; onChange?: (v: string) => void; options?: { readOnly?: boolean }; }) => (