// The sections an opened agent card holds. Run by `npm test`, which Node runs // with its built-in test runner and type stripping. import assert from "node:assert/strict"; import { test } from "node:test"; import { SECTION_TITLE, sectionsFor, startsOpen, } from "../src/agent/detail/sections.ts"; test("a card holds overview, settings and accounts, then the terminal", () => { assert.deepEqual(sectionsFor(true), [ "overview", "settings", "accounts", "terminal", ]); }); test("a page beside a terminal leaves the terminal out", () => { assert.deepEqual(sectionsFor(false), ["overview", "settings", "accounts"]); }); test("only the overview starts open", () => { assert.deepEqual(sectionsFor(true).filter(startsOpen), ["overview"]); }); test("every section has a header", () => { for (const s of sectionsFor(true)) assert.ok(SECTION_TITLE[s], s); });