import assert from 'node:assert/strict'; import fs from 'node:fs/promises'; import path from 'node:path'; import test from 'node:test'; import vm from 'node:vm'; const root = path.resolve(import.meta.dirname, '..'); async function read(relativePath) { return fs.readFile(path.join(root, relativePath), 'utf8'); } test('route editor entry point, dialog and forms are present', async () => { const html = await read('public/index.html'); const css = await read('public/css/editor.css'); const ui = await read('public/js/editor-ui.js'); assert.match(html, /id="editor-button"/); assert.match(html, /aria-label="Streckeneditor öffnen"/); assert.match(html, /aria-haspopup="dialog"/); assert.match(html, /aria-controls="editor-dialog"/); assert.match(html, /