const assert = require('node:assert/strict'); const fs = require('node:fs'); const path = require('node:path'); const test = require('node:test'); const root = path.join(__dirname, '..'); function read(relativePath) { return fs.readFileSync(path.join(root, relativePath), 'utf8'); } test('dashboard starts live polling and exposes required controls', () => { const html = read('frontend/index.html'); const dashboard = read('frontend/dashboard.js'); assert.match(html, /id="history-interval"/); assert.match(dashboard, /updateDashboard\(\);/); assert.match( dashboard, /setInterval\(updateDashboard,\s*POLLING_INTERVAL_MS\)/ ); }); test('dashboard HTML has balanced structural containers', () => { const html = read('frontend/index.html'); const openDivs = (html.match(/