| 1 | import assert from "node:assert/strict"; |
| 2 | import { test } from "node:test"; |
| 3 | import { organization } from "./structured-data.ts"; |
| 4 | |
| 5 | test("organization contact is the supplied public email, without an invented postal address", () => { |
| 6 | const descriptor = organization() as { "script:ld+json": Record<string, unknown> }; |
| 7 | assert.deepEqual(descriptor["script:ld+json"].contactPoint, { "@type": "ContactPoint", email: "hey@flagon.io", contactType: "customer support" }); |
| 8 | assert.equal(descriptor["script:ld+json"].address, undefined); |
| 9 | }); |