Files
descrybe/apps/web/src/lib/store-sync-delivery.test.ts
T
greeneclipse 8580c996c3 Initial commit of Descrybe v2 without local scratch artifacts.
Drop one-shot tmp/axe scripts and agent i18n scratch so the Gitea tree is deployable.
2026-08-09 22:47:43 +02:00

25 lines
977 B
TypeScript

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"]);
});
});