test: tighten slack thread cache timestamp · openclaw/openclaw@d3a2911
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -108,13 +108,13 @@ describe("slack sent-thread-cache", () => {
|
108 | 108 | logging: { getChildLogger: () => ({ warn: vi.fn() }) }, |
109 | 109 | } as never); |
110 | 110 | |
| 111 | +vi.spyOn(Date, "now").mockReturnValue(1_711_406_400_000); |
111 | 112 | recordSlackThreadParticipation("A1", "C123", "1700000000.000002"); |
112 | 113 | |
113 | 114 | await vi.waitFor(() => expect(register).toHaveBeenCalledTimes(1)); |
114 | | -expect(register).toHaveBeenCalledWith( |
115 | | -"A1:C123:1700000000.000002", |
116 | | -expect.objectContaining({ repliedAt: expect.any(Number) }), |
117 | | -); |
| 115 | +expect(register).toHaveBeenCalledWith("A1:C123:1700000000.000002", { |
| 116 | +repliedAt: 1_711_406_400_000, |
| 117 | +}); |
118 | 118 | |
119 | 119 | clearSlackThreadParticipationCache(); |
120 | 120 | await expect( |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。