import assert from "node:assert/strict"; import { describe, it } from "node:test"; import { storeSyncDeliveryBadgeKinds } from "./store-sync-delivery.ts"; describe("storeSyncDeliveryBadgeKinds", () => { it("always includes manual queue and webhooks_off", () => { const kinds = storeSyncDeliveryBadgeKinds({ intervalHours: 6, paused: false }); assert.ok(kinds.includes("manual")); assert.ok(kinds.includes("webhooks_off")); assert.ok(kinds.includes("scheduled")); assert.equal(kinds.includes("paused"), false); }); it("marks paused schedules without a scheduled badge", () => { const kinds = storeSyncDeliveryBadgeKinds({ intervalHours: 12, paused: true }); assert.deepEqual(kinds, ["manual", "paused", "webhooks_off"]); }); it("uses scheduled_default when interval is unset", () => { const kinds = storeSyncDeliveryBadgeKinds({ intervalHours: 0, paused: false }); assert.deepEqual(kinds, ["manual", "scheduled_default", "webhooks_off"]); }); });