declare const Deno: { test(name: string, fn: () => Promise | void): void; readTextFile(path: URL): Promise; }; function assert(condition: unknown, message: string): asserts condition { if (!condition) throw new Error(message); } Deno.test("config editor snapshots Svelte proxies before cloning baselines", async () => { const source = await Deno.readTextFile( new URL( "../../src/lib/workspace/config-source/ConfigSourceEditor.svelte", import.meta.url, ), ); assert( source.includes("$state.raw { const source = await Deno.readTextFile( new URL( "../../src/lib/workspace/settings/DecodalSourceEditor.svelte", import.meta.url, ), ); assert( source.includes("let view = $state.raw(null)") && source.includes("if (!host || untrack(() => view)) return"), "imperative EditorView should avoid deep proxying and remain outside the mount effect dependency graph", ); assert( source.includes("new Compartment()") && source.includes("readonlyCompartment.reconfigure") && source.includes("EditorView.editable.of(!nextReadonly)"), "readonly and editable facets should be reconfigured when the prop changes", ); assert( source.includes("syntaxHighlighting(syntaxTheme)") && source.includes("tags.keyword") && source.includes("tags.string"), "Decodal tokens should use an explicit syntax theme", ); assert( source.includes(".cm-cursor, .cm-dropCursor") && source.includes(".cm-selectionBackground") && source.includes("var(--interactive-selected)"), "cursor and selection should be visible against the workspace theme", ); assert( !source.includes("--surface-2") && !source.includes("--text-primary") && !source.includes("--border-subtle"), "CodeMirror theme must use workspace tokens that actually exist", ); });