test: tighten slack thread cache timestamp

This commit is contained in:
Peter Steinberger
2026-05-09 06:21:33 +01:00
parent 0e1ea080b8
commit d3a29110a0

View File

@@ -108,13 +108,13 @@ describe("slack sent-thread-cache", () => {
logging: { getChildLogger: () => ({ warn: vi.fn() }) },
} as never);
vi.spyOn(Date, "now").mockReturnValue(1_711_406_400_000);
recordSlackThreadParticipation("A1", "C123", "1700000000.000002");
await vi.waitFor(() => expect(register).toHaveBeenCalledTimes(1));
expect(register).toHaveBeenCalledWith(
"A1:C123:1700000000.000002",
expect.objectContaining({ repliedAt: expect.any(Number) }),
);
expect(register).toHaveBeenCalledWith("A1:C123:1700000000.000002", {
repliedAt: 1_711_406_400_000,
});
clearSlackThreadParticipationCache();
await expect(