import { describe, it } from 'node:test'; import assert from 'node:assert/strict'; import { readFileSync } from 'node:fs'; const html = readFileSync(new URL('../src/dashboard/index.html', import.meta.url), 'utf8'); // Extract an App method body by name (brace-slicing convention) so we can // exercise the real logic. function method(name) { const start = html.indexOf(` ${name}(`); const end = html.indexOf('\n },', start); assert.ok(start >= 0 && end > start, `expected ${name} method in index.html`); return html.slice(start, end + 4).trim(); } describe('dashboard a11y — segmented controls are radio groups (D3a)', () => { it('no seg-group still declares role="tablist"', () => { const segGroups = html.match(/