Files
documentation/scripts/roadmap.test.mjs
jarvis-at-skic 1de7d16d09
Build and publish Eldorado documentation / build (pull_request) Successful in 40s
docs: start roadmap with code and process assessment
2026-10-05 18:50:28 +00:00

30 lines
2.0 KiB
JavaScript

import {test} from 'node:test';
import assert from 'node:assert/strict';
import {readFileSync} from 'node:fs';
const read = path => readFileSync(path, 'utf8');
test('Roadmap visibly assesses code and real delivery before adoption', () => {
const page = read('docs/strategy/roadmap.mdx');
const visible = page.split('<details>')[0];
const headings = [...visible.matchAll(/^## (.+)$/gm)].map(match => match[1]);
assert.deepEqual(headings, ['1. Understand code quality and delivery', '2. Fix critical readiness gaps', '3. Run a bounded pilot', '4. Expand only on evidence', '5. Sustain and improve']);
assert(visible.indexOf(' story />') < visible.indexOf('## 1.'));
for (const marker of ['representative repositories', 'tests and CI', 'maintainability', 'technical debt', 'security findings', 'actual SDLC', 'ownership', 'review and release', 'bottlenecks', 'baseline findings', 'process map', 'prioritized gaps', 'alongside the pilot', './measurement.mdx', './target-operating-model.mdx']) assert(visible.includes(marker), marker);
assert.equal((visible.match(/\*\*Output:/g) || []).length, 5);
assert.match(visible, /Recommended sequence/);
assert(!page.includes('### Foundation'));
for (const marker of ['revocation', 'exact-artifact approvals', 'idempotency', 'human takeover', 'sensitive decisions']) assert(page.includes(marker), marker);
});
test('both roadmap diagrams make assessment and readiness prerequisites to the pilot', () => {
const ids = ['assessment', 'readiness', 'pilot', 'expansion', 'sustain'];
for (const suffix of ['', '-mobile']) {
const diagram = JSON.parse(read(`diagrams/strategy-roadmap${suffix}.architecture.json`));
assert.deepEqual(diagram.components.map(n => n.id), ids);
assert.deepEqual(diagram.connections.map(e => [e.from,e.to]), ids.slice(1).map((id, i) => [ids[i],id]));
assert.match(diagram.components[0].sublabel, /Code quality \+ delivery flow/);
assert.match(diagram.components[1].sublabel, /Critical gaps/);
assert.match(diagram.components[4].label, /Sustain/);
}
});