| 1 | import assert from "node:assert/strict"; |
| 2 | import { test } from "node:test"; |
| 3 | |
| 4 | import { CUSTOMIZE, CUSTOMIZE_SECTIONS, customizePath, sectionOfListing } from "./customize.ts"; |
| 5 | |
| 6 | test("every Marketplace listing has a place in Customize", () => { |
| 7 | assert.equal(sectionOfListing("integration"), "connectors"); |
| 8 | assert.equal(sectionOfListing("extension"), "plugins"); |
| 9 | for (const section of CUSTOMIZE_SECTIONS) assert.equal(CUSTOMIZE[section].id, section); |
| 10 | }); |
| 11 | |
| 12 | test("a section's site path names its workspace", () => { |
| 13 | assert.equal(customizePath("connectors", "acme"), "/acme/-/marketplace/integrations"); |
| 14 | assert.equal(customizePath("skills", "a b"), "/a%20b/-/agents/skills"); |
| 15 | }); |