Fix outbound confirmation and verification safety

This commit is contained in:
gitea committed 2026-10-12 00:13:22 +08:00
1 parent b17bd09194
commit 67a461452c
20 files changed
+313 -74

No files matched your search

+4
View File
@@ -26,6 +26,8 @@ describe("tokenizeDuration", () => {
expect(tokenizeDuration("5parsecs")).toBeUndefined();
expect(tokenizeDuration(Number.NaN)).toBeUndefined();
expect(tokenizeDuration(true as unknown as string)).toBeUndefined();
expect(tokenizeDuration("9".repeat(309))).toBeUndefined();
expect(tokenizeDuration("9".repeat(309) + "s")).toBeUndefined();
});
});
@@ -71,5 +73,7 @@ describe("parseDurationMs", () => {
test("falls back rather than failing a batch over a bad poll interval", () => {
expect(parseDurationMs("soon")).toBe(600_000);
expect(parseDurationMs("soon", 1000)).toBe(1000);
expect(parseDurationMs("9".repeat(309) + "s", 1000)).toBe(1000);
expect(parseDurationMs("9".repeat(308) + "d", 1000)).toBe(1000);
});
});