feat(hk): explain background updates with protected content links and retry details
CI / check (push) Failing after 1m34s
CI / deploy (push) Skipped
CI / publish-container (push) Skipped

This commit is contained in:
Simo committed 2026-09-13 19:41:25 +02:00
1 parent dd7613850e
commit c5c9941768
42 files changed
+1542 -145

No files matched your search

+18 -2
View File
@@ -7,6 +7,7 @@ const state = vi.hoisted(() => ({
articles: [] as Array<{
id: string;
userId: number | null;
title?: string;
status: string;
publishAt: Date;
}>,
@@ -146,8 +147,13 @@ it("uses the same UTC cutoff and publication timestamps regardless of the MySQL
);
expect(statements).toHaveLength(2);
for (const statement of statements) {
expect(format(statement.sql, statement.params, false, "+02:00")).toBe(
format(statement.sql, statement.params, false, "-07:00"),
const values = statement.params.map((value) => {
if (typeof value !== "string")
throw new Error("Expected explicit SQL string parameters");
return value;
});
expect(format(statement.sql, values, false, "+02:00")).toBe(
format(statement.sql, values, false, "-07:00"),
);
}
expect(statements[0].params).toEqual(["2030-06-01 08:09:10.123"]);
@@ -158,3 +164,13 @@ it("uses the same UTC cutoff and publication timestamps regardless of the MySQL
"2030-06-01 08:09:10.123",
]);
});
it("records the article title and exact identifier for the operation screen", async () => {
state.articles[0].title = "Scheduled community news";
await publishDueArticles(now);
expect(JSON.parse(String(state.operations[0][5]))).toEqual({
articleId: "1",
articleTitle: "Scheduled community news",
published: true,
});
});