import assert from "node:assert/strict"; import { dirname, join } from "node:path"; import { test } from "node:test"; import { fileURLToPath } from "node:url"; import * as ejs from "ejs"; const shell = join(dirname(fileURLToPath(import.meta.url)), "..", "..", "views", "partials", "shell.ejs"); const render = (data: Record = {}): Promise => ejs.renderFile(shell, data); test("app shell renders sidebar, topbar and the content slot", async () => { const html = await render({ title: "People", brand: { name: "Acme Console", sub: "v2" }, csrfToken: "tok.sig", user: { email: "ada@acme.io", initials: "AD", name: "ada" }, // a signed-in identity → profile + Sign out nav: 'Overview', body: '
page
', actions: '', }); // Skip link is the first focusable element, targeting the main landmark. assert.match(html, /