Add interactive SSH portfolio features

This commit is contained in:
2026-07-27 11:08:12 +09:00
parent eac572dcaf
commit 604080749b
32 changed files with 1356 additions and 31 deletions
+12
View File
@@ -0,0 +1,12 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { pages, pageMap } from '../src/pages/index.js';
test('page registry resolves aliases to their canonical module', () => {
for (const page of pages) for (const alias of page.aliases || []) assert.equal(pageMap.get(alias), page);
});
test('page registry is ordered and contains unique canonical pages', () => {
const canonical = [...new Set(pageMap.values())];
assert.deepEqual(canonical.map(page => page.name), pages.slice().sort((a, b) => (a.order ?? 100) - (b.order ?? 100) || a.name.localeCompare(b.name)).map(page => page.name));
});