Fix ntfy delivery diagnostics

This commit is contained in:
dinlo
2026-06-27 15:38:31 +08:00
parent a88ed8da75
commit 292cef5cbb
7 changed files with 33 additions and 17 deletions
+3
View File
@@ -1,4 +1,5 @@
import assert from "node:assert/strict";
import { normalizeNtfyServerUrl } from "../src/utils/ntfy";
import { getNextRepeatDate, parseReminderDate } from "../src/utils/date";
const base = new Date("2026-06-27T10:00:00");
@@ -22,3 +23,5 @@ assert.equal(nextDaily, "2026-06-28T10:00:00.000Z");
const nextWeekly = getNextRepeatDate("2026-06-20T10:00:00.000Z", { frequency: "weekly", interval: 2 }, new Date("2026-06-27T10:00:01.000Z"));
assert.equal(nextWeekly, "2026-07-04T10:00:00.000Z");
assert.equal(normalizeNtfyServerUrl("notifai.dinlo.ru/"), "https://notifai.dinlo.ru");
assert.equal(normalizeNtfyServerUrl("http://127.0.0.1:8080/"), "http://127.0.0.1:8080");