// The sections an agent's details hold. 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("the details hold the terminal, the activity, then one section per question", () => { assert.deepEqual(sectionsFor(true), [ "terminal", "activity", "instructions", "inference", "access", "accounts", ]); }); test("a page beside a terminal leaves the terminal and the activity out", () => { assert.deepEqual(sectionsFor(false), [ "instructions", "inference", "access", "accounts", ]); }); test("only the terminal starts open", () => { assert.deepEqual(sectionsFor(true).filter(startsOpen), ["terminal"]); }); test("every section has a header", () => { for (const s of sectionsFor(true)) assert.ok(SECTION_TITLE[s], s); });