test: cover active run comment queue guards

This commit is contained in:
Dotta committed 2026-05-01 10:17:54 -05:00
1 parent a8ea1e07fd
commit b04f4ad5d5
1 file changed
+30
@@ -751,6 +751,36 @@ describe("optimistic issue comments", () => {
).toBe(false);
});
it("does not mark the active run context comment as queued", () => {
expect(
isQueuedIssueComment({
comment: {
id: "context-comment",
createdAt: new Date("2026-03-28T16:20:05.000Z"),
},
activeRunStartedAt: new Date("2026-03-28T16:20:00.000Z"),
activeRunCommentId: "context-comment",
activeRunWakeCommentId: "wake-comment",
runId: null,
}),
).toBe(false);
});
it("does not mark the active run wake comment as queued", () => {
expect(
isQueuedIssueComment({
comment: {
id: "wake-comment",
createdAt: new Date("2026-03-28T16:20:05.000Z"),
},
activeRunStartedAt: new Date("2026-03-28T16:20:00.000Z"),
activeRunCommentId: "context-comment",
activeRunWakeCommentId: "wake-comment",
runId: null,
}),
).toBe(false);
});
it("does not mark comments with an associated run as queued", () => {
expect(
isQueuedIssueComment({