Add interactive SSH portfolio features
This commit is contained in:
@@ -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));
|
||||
});
|
||||
Reference in New Issue
Block a user