import test from "node:test"; import assert from "node:assert/strict"; const releaseNotes = await import("../../src/shared/utils/releaseNotes.ts"); test("parseActiveNewsPayload returns only valid active announcements", () => { assert.deepEqual( releaseNotes.parseActiveNewsPayload({ active: true, title: "Launch", message: "A short announcement", link: "https://github.com/diegosouzapw/tOmni", linkLabel: "Learn more", icon: "campaign", }), { active: true, title: "Launch", message: "A short announcement", link: "https://github.com/diegosouzapw/tOmni", linkLabel: "Learn more", icon: "campaign", } ); assert.equal(releaseNotes.parseActiveNewsPayload({ active: false }), null); assert.equal( releaseNotes.parseActiveNewsPayload({ active: true, title: "Unsafe icon", message: "Invalid icon names are rejected", icon: "campaign