Something went wrong. Try again.
My website. cameron.stream
Something went wrong. Try again.
TypeScript
123456789101112131415161718192021222324252627import assert from "node:assert/strict";import { existsSync, readFileSync } from "node:fs";import { resolve } from "node:path";import test from "node:test";import { getAboutDocument } from "./about-content.ts";
test("reads the Git-backed About document with its stable public identity", async () => { const about = await getAboutDocument(); assert.equal( about.uri, "at://did:plc:gfrmhdmjvxn2sjedzboeudef/stream.cameron.about/self", ); assert.match(about.body, /^# About me/m); assert.match(about.body, /recovering financial economist/);});
test("all repository-relative About assets exist", () => { const file = resolve(process.cwd(), "content/about.md"); const source = readFileSync(file, "utf8"); const missing: string[] = []; for (const match of source.matchAll(/\]\((\/assets\/[^)]+)\)/g)) { const asset = resolve(process.cwd(), "public", match[1].slice(1)); if (!existsSync(asset)) missing.push(match[1]); } assert.deepEqual(missing, []);});