test: tighten feishu debounce recorder assertion · openclaw/openclaw@f7d6ce9
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -679,12 +679,11 @@ describe("Feishu inbound debounce regressions", () => {
|
679 | 679 | expect(dispatched.message.message_id).toBe("om_new_latest_fresh"); |
680 | 680 | const combined = JSON.parse(dispatched.message.content) as { text?: string }; |
681 | 681 | expect(combined.text).toBe("fresh"); |
682 | | -expect(recordSpy).toHaveBeenCalledWith("om_old_latest_fresh", "default", expect.any(Function)); |
683 | | -expect(recordSpy).not.toHaveBeenCalledWith( |
684 | | -"om_new_latest_fresh", |
685 | | -"default", |
686 | | -expect.any(Function), |
687 | | -); |
| 682 | +expect(recordSpy).toHaveBeenCalledTimes(1); |
| 683 | +const [recordedMessageId, recordedNamespace, recordedLogger] = recordSpy.mock.calls[0] ?? []; |
| 684 | +expect(recordedMessageId).toBe("om_old_latest_fresh"); |
| 685 | +expect(recordedNamespace).toBe("default"); |
| 686 | +expect(typeof recordedLogger).toBe("function"); |
688 | 687 | }); |
689 | 688 | |
690 | 689 | it("releases early event dedupe when debounced dispatch fails", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。