diff --git a/src/components/main/trace-frame/code-col/__tests__/monaco-editor.spec.ts b/src/components/main/trace-frame/code-col/__tests__/monaco-editor.spec.ts new file mode 100644 index 0000000..922efd6 --- /dev/null +++ b/src/components/main/trace-frame/code-col/__tests__/monaco-editor.spec.ts @@ -0,0 +1,20 @@ +import { describe, it, expect } from "vitest"; +import { ref } from "vue"; + +import { withSetup } from "@/tests/test-utils"; + +import { useMonacoEditor } from "../monaco-editor"; + +describe("useMonacoEditor", () => { + it("editor is created", () => { + let result!: ReturnType; + const element = ref(document.createElement("div")); + const source = ref(""); + const app = withSetup(() => { + result = useMonacoEditor(element, source); + }); + const { editor, model } = result; + expect(editor.value).toBeDefined(); + app.unmount(); + }); +});